Changeset - b367b016ee39
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 12 years ago 2013-05-30 14:12:32
marcin@python-works.com
Added large_client_header_buffers directive into example nginx
config. Fixes issues with hg operations involving sending large amount of
branches stored in request headers.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
docs/setup.rst
Show inline comments
 
@@ -574,55 +574,56 @@ Sample config for nginx using proxy::
 
       ## uncomment root directive if you want to serve static files by nginx
 
       ## requires static_files = false in .ini file
 
       #root /path/to/installation/rhodecode/public;
 
       include         /etc/nginx/proxy.conf;
 
       location / {
 
            try_files $uri @rhode;
 
       }
 

	
 
       location @rhode {
 
            proxy_pass      http://rc;
 
       }
 

	
 
    }
 

	
 
Here's the proxy.conf. It's tuned so it will not timeout on long
 
pushes or large pushes::
 

	
 
    proxy_redirect              off;
 
    proxy_set_header            Host $host;
 
    proxy_set_header            X-Url-Scheme $scheme;
 
    proxy_set_header            X-Host $http_host;
 
    proxy_set_header            X-Real-IP $remote_addr;
 
    proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;
 
    proxy_set_header            Proxy-host $proxy_host;
 
    client_max_body_size        400m;
 
    client_body_buffer_size     128k;
 
    proxy_buffering             off;
 
    proxy_connect_timeout       7200;
 
    proxy_send_timeout          7200;
 
    proxy_read_timeout          7200;
 
    proxy_buffers               8 32k;
 
    client_max_body_size        1024m;
 
    client_body_buffer_size     128k;
 
    large_client_header_buffers 8 64k;
 

	
 

	
 
Apache virtual host reverse proxy example
 
-----------------------------------------
 

	
 
Here is a sample configuration file for apache using proxy::
 

	
 
    <VirtualHost *:80>
 
            ServerName hg.myserver.com
 
            ServerAlias hg.myserver.com
 

	
 
            <Proxy *>
 
              Order allow,deny
 
              Allow from all
 
            </Proxy>
 

	
 
            #important !
 
            #Directive to properly generate url (clone url) for pylons
 
            ProxyPreserveHost On
 

	
 
            #rhodecode instance
 
            ProxyPass / http://127.0.0.1:5000/
 
            ProxyPassReverse / http://127.0.0.1:5000/
 

	
0 comments (0 inline, 0 general)