Hello! I have a site on nodejs and I want everything to go through the nginx proxy. My config:
upstream nodejs { server localhost:3000; } server { listen 80; server_name localhost; root /home/dev/myApp; location / { try_files $uri $uri/ @nodejs; } error_log /var/log/nginx/myApp.error.log; location @nodejs { proxy_redirect off; proxy_http_version 1.1; proxy_pass http://nodejs; proxy_set_header Host $host ; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } Everything gives statics well, but when I send POST and PUT gives me the following in the logs
2016/04/05 14:04:38 [error] 16318#0: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.112, server: localhost, request: "POST /login HTTP/1.1", upstream: "http://127.0.0.1:3000/login", host: "myApp.dev.lan", referrer: "http://myApp.dev.lan/login" with it on a simple localhost: 3000 only with nodejs everything works fine. Tell me where to look. to solve the problem? crawled the Internet - did not find anything. I would appreciate that. Thank!