Changeset - b05eb16ea105
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-08-20 19:08:52
marcin@python-works.com
fixes #206
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
docs/setup.rst
Show inline comments
 
.. _setup:
 

	
 
Setup
 
=====
 

	
 

	
 
Setting up RhodeCode
 
--------------------------
 
--------------------
 

	
 
First, you will need to create a RhodeCode configuration file. Run the 
 
following command to do this::
 
 
 
    paster make-config RhodeCode production.ini
 

	
 
- This will create the file `production.ini` in the current directory. This
 
  configuration file contains the various settings for RhodeCode, e.g proxy 
 
  port, email settings, usage of static files, cache, celery settings and 
 
  logging.
 

	
 

	
 
Next, you need to create the databases used by RhodeCode. I recommend that you
 
use sqlite (default) or postgresql. If you choose a database other than the
 
default ensure you properly adjust the db url in your production.ini
 
configuration file to use this other database. Create the databases by running
 
the following command::
 

	
 
    paster setup-app production.ini
 

	
 
This will prompt you for a "root" path. This "root" path is the location where
 
RhodeCode will store all of its repositories on the current machine. After
 
entering this "root" path ``setup-app`` will also prompt you for a username 
 
and password for the initial admin account which ``setup-app`` sets up for you.
 
@@ -351,50 +351,50 @@ Setting Up Celery
 
Since version 1.1 celery is configured by the rhodecode ini configuration files.
 
Simply set use_celery=true in the ini file then add / change the configuration 
 
variables inside the ini file.
 

	
 
Remember that the ini files use the format with '.' not with '_' like celery.
 
So for example setting `BROKER_HOST` in celery means setting `broker.host` in
 
the config file.
 

	
 
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, set the `force_https = true` in the ini configuration to force 
 
  using https, no headers are needed than to enable https
 
- 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::
 

	
 
    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;  
 
       }
 
    }  
 
  
 
Here's the proxy.conf. It's tuned so it will not timeout on long
0 comments (0 inline, 0 general)