错误原因:upstream 写在了server里面没有写在http里面

#设定负载均衡的服务器列表
#必须配置在http里面,重要upstream wxapp{#weigth参数表示权值,权值越高被分配到的几率越大server 127.0.0.1:8199;server 127.0.0.1:8198 backup;这里其实是做了一个热备}#负载均衡的步骤,必须先配置反向代理
#server里面的部分
location ^~ /public {access_log off;expires    1d;root       /data/golang/www/wxapp.xxx.com/public;try_files  $uri @zxtwxapp;}location / {try_files $uri @zxtwxapp;}location @zxtwxapp {proxy_pass                 http://wxapp;proxy_redirect             off;proxy_set_header           Host             $host;proxy_set_header           X-Real-IP        $remote_addr;proxy_set_header           X-Forwarded-For  $proxy_add_x_forwarded_for;proxy_connect_timeout 600;proxy_read_timeout 600;}
}

upstream directive is not allowed here in相关推荐

  1. nginx集群报错“upstream”directive is not allow here 错误 [

    nginx集群报错"upstream"directive is not allow here 错误 搭建了一个服务器, 采用的是nginx + apache(多个) + php + ...

  2. 【Nginx】错误: [emerg] “proxy_set_header“ directive is not allowed here in D:\sde\phpstudy_pro\...

    前言 nginx 1.15.11(下面的代码在此版本测试通过) win10 phpstudy 8.1.1.3 错误 nginx: [emerg] "proxy_set_header" ...

  3. Nginx 配置问题 server directive is not allowed here in /etc/nginx/nginx.conf:69

    前沿 今天在其他服务器上重新配置 nginx.conf 文件,配置结束启动 nginx 发现遇到了这样一个错误,我擦-?我配置文件都是从上个服务器上 复制粘贴过来的,怎么会遇到这个问题呢?百思不得其解 ...

  4. 哎呦报错啦怎么办?nginx: [emerg] “server“ directive is not allowed here in /usr/local/nginx/conf/nginx.conf53

    报错怎么办?不要慌,排它! 1.具体报错提示信息 nginx: [emerg] "server" directive is not allowed here in /usr/loc ...

  5. nginx: [emerg] “location“ directive is not allowed here

    nginx配置出错. D:\nginx>nginx.exe -t nginx: [emerg] "location" directive is not allowed her ...

  6. nginx: [emerg] “location“ directive is not allowed here in /usr/local/nginx/conf/nginx.conf:72

    做LNMP实验中的PHP设置完测试页面重启nginx时发现重不不成用nginx -t检测说如下原因 nginx: [emerg] "location" directive is n ...

  7. Nginx 启动报错 directive is not allowed here in

    问题场景 Linux 系统中, Nginx 安装包中默认提供了 conf 文件夹,并且自带的 nginx.conf 配置文件中默认 include 该文件夹下的配置文章. 笔者本次使用 Windows ...

  8. 解决nginx: [emerg] “ssl“ directive is not allowed here in /etc/nginx/conf.d/xxx.conf:5

    精品好文推荐: 部署nginx为自定义服务做代理转发并实现密码认证登录 报错时的情况: 最后发现是位置不对,把ssl的配置移到location之外就OK!

  9. Java牛客项目课_仿牛客网讨论区_第八章

    文章目录 第八章.项目发布与总结 8.1. 单元测试 8.2.项目监控 8.3.项目部署 宝塔面板.yum.rpm.压缩包 安装 unzip.Java1.8.Maven.MySQL.Redis.Kaf ...

最新文章

  1. Html-Css 从入门到放弃(一)基础知识
  2. IntelliJ IDEA 12详细开发教程(四) 搭建Android应用开发环境与Android项目创建
  3. 机器学习陷入困境,谷歌大脑专家发文吐槽 AI 工程现状
  4. Science公布:全世界最前沿的125个科学问题
  5. 边缘计算 — 起源与定义
  6. java多态替换switch_使多态性无法解决那些switch / case语句的麻烦
  7. 最小生成树的Kruskal算法实现
  8. 网络编程(part6)--OSI七层模型及四层模型(TCP/IP)
  9. 基于matlab实现的人脸检测
  10. 十、最大熵模型与EM算法
  11. pycharm remote 远程项目 同步 本地_利器:PyCharm本地连接服务器搭建深度学习实验环境的三重境界...
  12. java none怎么用tomcat_使用tomcat做java中间件
  13. java打字训练课程设计_Java打字训练课程设计
  14. 张东:大数据时代挑战与解决之道
  15. 推荐C语言编译器(手机APP)
  16. c语言给程序加锁,C语言使用fcntl对文件加锁
  17. linux 中gnu的含义是,GNU是什么意思
  18. SAP Fiori 的学习路线指南
  19. android硬件抽象层(HAL)详解
  20. 百思不得姐框架(二)

热门文章

  1. Implementation of the USB 3.0 controller not found!
  2. Java中的抽象类和接口(interface),abstract关键字的用法
  3. 关于Java静态属性初始化
  4. 超级终端软件哪个好_同城配送软件哪个好?如何选择配送软件?
  5. linux,shell中if else if的写法,if elif
  6. 日志的艺术(The art of logging)
  7. SQL 2000 中如何 纵表变横表
  8. SQL练习题完整(做完你就是高手)
  9. GDC2016 【巫师3 狂猎】的游戏事件工作流
  10. OSChina 周三乱弹——真相往往令人内牛满面