Static page is served correctly you can visit : http://www.ec2.lankenow.info/ click on the image and it will take you to the error page.
Nginx error log:
2012/03/16 01:58:41 [alert] 884#0: 768 worker_connections are not enough
2012/03/16 01:58:41 [error] 887#0: *3900 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 23.21.141.105, server: www.ec2.lankenow.info, request: "GET /leads HTTP/1.0", upstream: "http://23.21.141.105:80/leads", host: "www.ec2.lankenow.info", referrer: "http://www.ec2.lankenow.info/"
I think I might have to set client_header_buffer_size but dont know how or which file to edit. Any direction how to go about it would be much appreciated.
EDIT: This can be added to the http section of nginx.conf which can be found in /etc/nginx/ or usr/local/nginx/ depending on your installation
Config file under /etc/nginx/sites-available/
upstream vdiamond {
server 0.0.0.0:3000;
server 0.0.0.0:3001;
server 0.0.0.0:3002;
}
server {
listen 80;
server_name www.ec2.lankenow.info;
access_log /home/ubuntu/vdiamond/log/access.log;
error_log /home/ubuntu/vdiamond/log/error.log;
root /home/ubuntu/vdiamond/public/;
index index.html;
location / {
# Add expires header for static content
location ~* \.(js|css|jpg|jpeg|gif|png)$ {
if (-f $request_filename) {
expires max;
break;
}
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_read_timeout 300;
proxy_next_upstream off;
#proxy_redirect false;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://www.ec2.lankenow.info;
break;
}
}
}