1. 程式人生 > >nginx dwr,js,css,jpg

nginx dwr,js,css,jpg

        location / {
            proxy_pass http://localhost:8080/;  
            proxy_set_header Host $host;  
            proxy_set_header X-Real-IP $remote_addr;  
            proxy_set_header REMOTE-HOST $remote_addr;  
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        }
	location ~ /validatecode.png$ {
            proxy_pass http://localhost:8080;
        }
	location ~ /dwr/* {
            proxy_pass http://localhost:8080;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location ~.*\.(htm|gif|jpg|jpeg|png|ico|js|rar|css|zip|txt|flv|swf|doc|ppt|xls|pdf)$  {
            root   /usr/local/resin-pro-4.0.40/webapps/ROOT/;
        }