nginx_sub.conf

server {
        listen       |IP|:85;
        server_name  |SUB|.|DOMAIN| www.|SUB|.|DOMAIN|;
        access_log /var/log/httpd/domains/|DOMAIN|.|SUB|.log  main;
        error_log  /var/log/httpd/domains/|DOMAIN|.|SUB|.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/|SUB|;
	    expires 14d;
            error_page   404  =  @back;
        }
    }
 
nginx/nginx_sub.conf.txt · Last modified: 2010/02/07 18:09 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