Nginx 未知指令“proxy_pass”

Ner*_*rea 6 nginx

我的 nginx 配置有问题。

当我这样设置配置时:

 server {
         server_name redmine;
        listen       80;

        location / {
           proxy_pass http://172.16.0.70:33000;
        }
}
Run Code Online (Sandbox Code Playgroud)

我收到此错误 nginx: [emerg] 未知指令“proxy_pass”。

我的 nginx 版本是 nginx/1.8.0。

有人知道我错过了什么或我做错了什么吗?谢谢。

Max*_* P. 2

好像ngx_http_proxy_module没有安装模块

运行nginx -V查看nginx配置情况。如果配置了选项,--without-http_proxy_module则 nginx 没有代理模块,需要重新编译。

  • 好吧,这可能是问题的原因,但是如何解决呢? (4认同)