Hi, i've just finished set up a new nginx instalation on windows 7 it just proxy a node.js express application and a node.js service, the problem is that after finishing the configuration, the site is unusable, is really slow and i'm sure there is something missing but i can not figure out what. Any ideas???
I'm also seeing a lot of this lines in my errors log file
2013/12/13 16:26:46 [error] 356#7660: *1 upstream timed out (10060: FormatMessage() error:(15100)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /css/bootstrap.min.css HTTP/1.1", upstream: "http://[::1]:8000/css/bootstrap.min.css", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:26:46 [error] 356#7660: *3 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /css/login.css HTTP/1.1", upstream: "http://[::1]:8000/css/login.css", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:26:46 [error] 356#7660: *5 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /css/user-profile.css HTTP/1.1", upstream: "http://[::1]:8000/css/user-profile.css", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:26:46 [error] 356#7660: *2 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /css/media-queries.css HTTP/1.1", upstream: "http://[::1]:8000/css/media-queries.css", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:26:46 [error] 356#7660: *7 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /scripts/vendor/jquery/jquery.js HTTP/1.1", upstream: "http://[::1]:8000/scripts/vendor/jquery/jquery.js", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:26:46 [error] 356#7660: *4 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /scripts/vendor/backbone/backbone.js HTTP/1.1", upstream: "http://[::1]:8000/scripts/vendor/backbone/backbone.js", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:29:52 [error] 356#7660: *67 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "POST /actors/login HTTP/1.1", upstream: "http://[::1]:8001/actors/login", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:30:53 [error] 356#7660: *67 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /public/images/bkg-rpt-wave.png HTTP/1.1", upstream: "http://[::1]:8000/public/images/bkg-rpt-wave.png", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:31:58 [error] 356#7660: *67 upstream timed out (10060: FormatMessage() error:(15105)) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /jobs/saved/actor/?actorId=526eb8eeec0629fc1b000007 HTTP/1.1", upstream: "http://[::1]:8001/jobs/saved/actor/?actorId=526eb8eeec0629fc1b000007", host: "localhost:4000", referrer: "http://localhost:4000/"
2013/12/13 16:41:25 [notice] 6192#5364: signal process started
Here is my configuration
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
upstream engine {
server localhost:8001;
keepalive 64;
}
upstream marionette {
server localhost:8000;
keepalive 64;
}
server {
listen 4000;
server_name localhost;
access_log C:/development/nginx-1.4.4/logs/nodetest.log;
location / {
proxy_http_version 1.1;
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_set_header X-NginX-Proxy true;
proxy_pass http://marionette;
proxy_redirect off;
}
location ~*/industries {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /actors {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location verify {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /assessments {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /actor_assessments {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /enrollments {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /create_customer {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /jobs {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /predictoccupation {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /cpreferences {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /occupations {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
location /courses {
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_set_header X-NginX-Proxy true;
proxy_pass http://engine;
proxy_redirect off;
}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}