I'm using nginx to upstream a server nodeJs APP.
I have this error :
2015/05/04 08:41:46 [crit] 5355#0: *7 connect() to 127.0.0.1:2000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: ws-test.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:2000/", host: "ws-test.com"
Yes we have a lot of example to correct but nothing working...
I have change the user in nginx.conf to the conecting user: like here
user adminmf
I have change chmod for my project : 775
This is my conf :
upstream proxy {
# Correspond au serveur proxy que vous avez lancé avec npm run startProxy
server localhost:2000;
}
server {
listen 80;
server_name ws-test.com;
location / {
proxy_pass http://proxy;
}
error_log /var/log/nginx/proxyWS.error.log;
access_log /var/log/nginx/proxyWS.access.log;
}
If I use the commande
curl http://localhost:2000/
curl http://127.0.0.1:2000/
My server is working....
But not with :
curl http://ws-test.com
Yes I have this line in my /etc/hosts
127.0.0.1 ws-test.com
I need help !