@@ -456,69 +456,78 @@ In order to start using celery run::
paster celeryd <configfile.ini>
.. note::
Make sure you run this command from the same virtualenv, and with the same
user that rhodecode runs.
HTTPS support
-------------
There are two ways to enable https:
- Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
recognize this headers and make proper https redirections
- Alternatively, change the `force_https = true` flag in the ini configuration
to force using https, no headers are needed than to enable https
Nginx virtual host example
--------------------------
Sample config for nginx using proxy::
upstream rc {
server 127.0.0.1:5000;
# add more instances for load balancing
#server 127.0.0.1:5001;
#server 127.0.0.1:5002;
}
server {
listen 80;
server_name hg.myserver.com;
access_log /var/log/nginx/rhodecode.access.log;
error_log /var/log/nginx/rhodecode.error.log;
location / {
root /var/www/rhodecode/rhodecode/public/;
if (!-f $request_filename){
proxy_pass http://127.0.0.1:5000;
#this is important if you want to use https !!!
proxy_set_header X-Url-Scheme $scheme;
include /etc/nginx/proxy.conf;
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-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;
Also, when using root path with nginx you might set the static files to false
in the production.ini file::
[app:main]
use = egg:rhodecode
full_stack = true
static_files = false
lang=en
cache_dir = %(here)s/data
In order to not have the statics served by the application. This improves speed.
Status change: