annotate docs/setup.rst @ 775:aaf2fc59a39a beta

fixes #77 and adds extendable base Dn with custom uid specification
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 26 Nov 2010 23:49:19 +0100
parents 5f82a00b92b1
children aac24db58ce8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
568
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 .. _setup:
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 Setup
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 =====
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
7 Setting up the application
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
8 --------------------------
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
9
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
10 ::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
11
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
12 paster make-config RhodeCode production.ini
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
13
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
14 - This will create `production.ini` config inside the directory
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
15 this config contains various settings for RhodeCode, e.g proxy port,
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
16 email settings,static files, cache and logging.
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
17
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
18 ::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
19
597
53128b6b9a4d added password validation, second try on paster setup-app,
Marcin Kuzminski <marcin@python-works.com>
parents: 592
diff changeset
20 paster setup-app production.ini
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
21
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
22 - This command will create all needed tables and an admin account.
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
23 When asked for a path You can either use a new location of one with already
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
24 existing ones. RhodeCode will simply add all new found repositories to
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
25 it's database. Also make sure You specify correct path to repositories.
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
26 - Remember that the given path for mercurial_ repositories must be write
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
27 accessible for the application. It's very important since RhodeCode web interface
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
28 will work even without such an access but, when trying to do a push it'll
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
29 eventually fail with permission denied errors.
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
30 - Run
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
31
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
32 ::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
33
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
34 paster serve production.ini
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
35
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
36 - This command runs the RhodeCode server the app should be available at the
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
37 127.0.0.1:5000. This ip and port is configurable via the production.ini
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
38 file created in previous step
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
39 - Use admin account you created to login.
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
40 - Default permissions on each repository is read, and owner is admin. So
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
41 remember to update these if needed.
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
42
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
43
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
44 Setting up Whoosh full text search
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
45 ----------------------------------
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
46
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
47 Index for whoosh can be build starting from version 1.1 using paster command
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
48 passing repo locations to index, as well as Your config file that stores
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
49 whoosh index files locations. There is possible to pass `-f` to the options
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
50 to enable full index rebuild. Without that indexing will run always in in
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
51 incremental mode.
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
52
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
53 ::
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
54
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
55 paster make-index --repo-location=<location for repos> production.ini
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
56
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
57 for full index rebuild You can use
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
58
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
59 ::
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
60
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
61 paster make-index -f --repo-location=<location for repos> production.ini
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
62
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
63 - For full text search You can either put crontab entry for
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
64
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
65 This command can be run even from crontab in order to do periodical
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
66 index builds and keep Your index always up to date. An example entry might
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
67 look like this
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
68
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
69 ::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
70
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
71 /path/to/python/bin/paster --repo-location=<location for repos> /path/to/rhodecode/production.ini
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
72
683
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
73 When using incremental(default) mode whoosh will check last modification date
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
74 of each file and add it to reindex if newer file is available. Also indexing
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
75 daemon checks for removed files and removes them from index.
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
76
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
77 Sometime You might want to rebuild index from scratch. You can do that using
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
78 the `-f` flag passed to paster command or, in admin panel You can check
341beaa9edba Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents: 597
diff changeset
79 `build from scratch` flag.
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
80
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
81
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
82 Setting up LDAP support
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
83 -----------------------
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
84
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
85 RhodeCode starting from version 1.1 supports ldap authentication. In order
733
ac701b421053 fixed docs, for python-ldap import
Marcin Kuzminski <marcin@python-works.com>
parents: 715
diff changeset
86 to use ldap, You have to install python-ldap package. This package is available
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
87 via pypi, so You can install it by running
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
88
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
89 ::
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
90
733
ac701b421053 fixed docs, for python-ldap import
Marcin Kuzminski <marcin@python-works.com>
parents: 715
diff changeset
91 easy_install python-ldap
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
92
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
93 ::
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
94
733
ac701b421053 fixed docs, for python-ldap import
Marcin Kuzminski <marcin@python-works.com>
parents: 715
diff changeset
95 pip install python-ldap
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
96
770
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
97 .. note::
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
98 python-ldap requires some certain libs on Your system, so before installing
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
99 it check that You have at least `openldap`, and `sasl` libraries.
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
100
770
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
101 ldap settings are located in admin->ldap section,
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
102
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
103 Here's a typical ldap setup::
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
104
770
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
105 Enable ldap = checked #controls if ldap access is enabled
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
106 Host = host.domain.org #actual ldap server to connect
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
107 Port = 389 or 689 for ldaps #ldap server ports
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
108 Enable LDAPS = unchecked #enable disable ldaps
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
109 Account = <account> #access for ldap server(if required)
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
110 Password = <password> #password for ldap server(if required)
770
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
111 Base DN = uid=%(user)s,CN=users,DC=host,DC=domain,DC=org
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
112
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
113
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
114 `Account` and `Password` are optional, and used for two-phase ldap
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
115 authentication so those are credentials to access Your ldap, if it doesn't
775
aaf2fc59a39a fixes #77 and adds extendable base Dn with custom uid specification
Marcin Kuzminski <marcin@python-works.com>
parents: 770
diff changeset
116 support anonymous search/user lookups.
aaf2fc59a39a fixes #77 and adds extendable base Dn with custom uid specification
Marcin Kuzminski <marcin@python-works.com>
parents: 770
diff changeset
117
aaf2fc59a39a fixes #77 and adds extendable base Dn with custom uid specification
Marcin Kuzminski <marcin@python-works.com>
parents: 770
diff changeset
118 Base DN must have %(user)s template inside, it's a placer where Your uid used
aaf2fc59a39a fixes #77 and adds extendable base Dn with custom uid specification
Marcin Kuzminski <marcin@python-works.com>
parents: 770
diff changeset
119 to login would go, it allows admins to specify not standard schema for uid
aaf2fc59a39a fixes #77 and adds extendable base Dn with custom uid specification
Marcin Kuzminski <marcin@python-works.com>
parents: 770
diff changeset
120 variable
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
121
733
ac701b421053 fixed docs, for python-ldap import
Marcin Kuzminski <marcin@python-works.com>
parents: 715
diff changeset
122 If all data are entered correctly, and `python-ldap` is properly installed
770
5f82a00b92b1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 744
diff changeset
123 Users should be granted to access RhodeCode wit ldap accounts. When
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
124 logging at the first time an special ldap account is created inside RhodeCode,
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
125 so You can control over permissions even on ldap users. If such user exists
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
126 already in RhodeCode database ldap user with the same username would be not
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
127 able to access RhodeCode.
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
128
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
129 If You have problems with ldap access and believe You entered correct
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
130 information check out the RhodeCode logs,any error messages sent from
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
131 ldap will be saved there.
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
132
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
133
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
134 Nginx virtual host example
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
135 --------------------------
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
136
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
137 Sample config for nginx using proxy::
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
138
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
139 server {
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
140 listen 80;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
141 server_name hg.myserver.com;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
142 access_log /var/log/nginx/rhodecode.access.log;
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
143 error_log /var/log/nginx/rhodecode.error.log;
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
144 location / {
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
145 root /var/www/rhodecode/rhodecode/public/;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
146 if (!-f $request_filename){
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
147 proxy_pass http://127.0.0.1:5000;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
148 }
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
149 #this is important for https !!!
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
150 proxy_set_header X-Url-Scheme $scheme;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
151 include /etc/nginx/proxy.conf;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
152 }
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
153 }
568
5f481e4e888b updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
154
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
155 Here's the proxy.conf. It's tuned so it'll not timeout on long
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
156 pushes and also on large pushes::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
157
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
158 proxy_redirect off;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
159 proxy_set_header Host $host;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
160 proxy_set_header X-Host $http_host;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
161 proxy_set_header X-Real-IP $remote_addr;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
162 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
163 proxy_set_header Proxy-host $proxy_host;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
164 client_max_body_size 400m;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
165 client_body_buffer_size 128k;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
166 proxy_buffering off;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
167 proxy_connect_timeout 3600;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
168 proxy_send_timeout 3600;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
169 proxy_read_timeout 3600;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
170 proxy_buffer_size 8k;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
171 proxy_buffers 8 32k;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
172 proxy_busy_buffers_size 64k;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
173 proxy_temp_file_write_size 64k;
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
174
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
175 Also when using root path with nginx You might set the static files to false
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
176 in production.ini file::
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
177
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
178 [app:main]
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
179 use = egg:rhodecode
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
180 full_stack = true
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
181 static_files = false
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
182 lang=en
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
183 cache_dir = %(here)s/data
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
184
592
0a48c1ec04fc #37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents: 591
diff changeset
185 To not have the statics served by the application. And improve speed.
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
186
744
3389f272ece1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 733
diff changeset
187 Apache reverse proxy
3389f272ece1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 733
diff changeset
188 --------------------
3389f272ece1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 733
diff changeset
189 Tutorial can be found here
3389f272ece1 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 733
diff changeset
190 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
191
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
192
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
193 Apache's example FCGI config
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
194 ----------------------------
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
195
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
196 TODO !
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
197
591
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
198 Other configuration files
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
199 -------------------------
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
200
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
201 Some extra configuration files and examples can be found here:
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
202 http://hg.python-works.com/rhodecode/files/tip/init.d
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
203
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
204 and also an celeryconfig file can be use from here:
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
205 http://hg.python-works.com/rhodecode/files/tip/celeryconfig.py
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
206
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
207 Troubleshooting
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
208 ---------------
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
209
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
210 - missing static files ?
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
211
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
212 - make sure either to set the `static_files = true` in the .ini file or
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
213 double check the root path for Your http setup. It should point to
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
214 for example:
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
215 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
216
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
217 - can't install celery/rabbitmq
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
218
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
219 - don't worry RhodeCode works without them too. No extra setup required
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
220
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
221
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
222 - long lasting push timeouts ?
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
223
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
224 - make sure You set a longer timeouts in Your proxy/fcgi settings, timeouts
715
066af351c6d8 Fixed archivals by passing baseui to scm get method for hg.
Marcin Kuzminski <marcin@python-works.com>
parents: 707
diff changeset
225 are caused by https server and not RhodeCode
707
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
226
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
227 - large pushes timeouts ?
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
228
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
229 - make sure You set a proper max_body_size for the http server
1105531ae572 docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents: 683
diff changeset
230
591
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
231
1e2adb37cab6 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 572
diff changeset
232
572
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
233 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
234 .. _python: http://www.python.org/
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
235 .. _mercurial: http://mercurial.selenic.com/
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
236 .. _celery: http://celeryproject.org/
a60cd29ba7e2 more docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 568
diff changeset
237 .. _rabbitmq: http://www.rabbitmq.com/