nginx.conf

server {
        listen       |IP|:85;
        server_name  |DOMAIN| www.|DOMAIN| |SERVER_ALIASES|;
        access_log /var/log/httpd/domains/|DOMAIN|.log  main;
        error_log  /var/log/httpd/domains/|DOMAIN|.error.log error;
        location / {
                        proxy_pass         http://|IP|;
                        proxy_redirect     off;

                        proxy_set_header   Host             $host;
                        proxy_set_header   X-Real-IP        $remote_addr;
			proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                        
                        client_max_body_size 10m;
                        client_body_buffer_size 128k;
                        
                        
                        proxy_connect_timeout 60;
                        proxy_send_timeout 90;
                        proxy_read_timeout 90;
                        
                        
                        proxy_buffer_size 4k;
                        proxy_buffers 120 64k;
                        proxy_busy_buffers_size 64k;
                        proxy_temp_file_write_size 64k;
                        
                    }
	location @back {
    	    proxy_pass         http://|IP|;
    	    proxy_redirect     off;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        }
        #Static files location
	location ~* ^.+\.(jpg|jpeg|gif|mp3|png|avi|vob|mpg|mpeg|mp4|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
            root |HOME|/domains/|DOMAIN|/public_html;
            expires 14d;
            error_page   404  =  @back;
        }
    }

 
nginx/nginx.conf.txt · Last modified: 2010/02/07 18:07 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki