John Feuerstein
June 08, 2011 10:22AM
On 06/08/2011 04:14 PM, baurusites wrote:
> people please help me, I can not run Nginx
>
>
> root@servidor [~]# proxy_passRestarting nginx daemon: nginxnginx:
> [emerg] "proxy_pass" directive is not allowed here in
> /etc/nginx/nginx.conf:45
>

replace this:

proxy_temp_path /tmp/nginx_proxy/;
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;

with this:

location / {
proxy_temp_path /tmp/nginx_proxy/;
proxy_pass http://127.0.0.1:8081;
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_pass is not allowed in http context, you need a location block.
See http://wiki.nginx.org/HttpProxyModule#proxy_pass


Hope this helps,
John

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Urgent proxy_pass

baurusites June 08, 2011 10:14AM

Re: Urgent proxy_pass

John Feuerstein June 08, 2011 10:22AM

Re: Urgent proxy_pass

John Feuerstein June 08, 2011 10:26AM

Re: Urgent proxy_pass

baurusites June 08, 2011 07:40PM

Re: Urgent proxy_pass

baurusites June 08, 2011 10:31AM

Re: Urgent proxy_pass

António P. P. Almeida June 08, 2011 10:54AM

Re: Urgent proxy_pass

baurusites June 08, 2011 11:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready