##// END OF EJS Templates
Added troubleshooting section to docs
marcink -
r2601:aa90719e beta
parent child Browse files
Show More
@@ -0,0 +1,70 b''
1 .. _troubleshooting:
2
3
4 ===============
5 Troubleshooting
6 ===============
7
8 :Q: **Missing static files?**
9 :A: Make sure either to set the `static_files = true` in the .ini file or
10 double check the root path for your http setup. It should point to
11 for example:
12 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
13
14 |
15
16 :Q: **Can't install celery/rabbitmq?**
17 :A: Don't worry RhodeCode works without them too. No extra setup is required.
18 Try out great celery docs for further help.
19
20 |
21
22 :Q: **Long lasting push timeouts?**
23 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
24 are caused by https server and not RhodeCode.
25
26 |
27
28 :Q: **Large pushes timeouts?**
29 :A: Make sure you set a proper max_body_size for the http server. Very often
30 Apache, Nginx or other http servers kill the connection due to to large
31 body.
32
33 |
34
35 :Q: **Apache doesn't pass basicAuth on pull/push?**
36 :A: Make sure you added `WSGIPassAuthorization true`.
37
38 |
39
40 :Q: **Git fails on push/pull?**
41 :A: Make sure you're using an wsgi http server that can handle chunked encoding
42 such as `waitress` or `gunicorn`
43
44 |
45
46 :Q: **How i use hooks in RhodeCode?**
47 :A: It's easy if they are python hooks just use advanced link in hooks section
48 in Admin panel, that works only for Mercurial. If you want to use githooks,
49 just install proper one in repository eg. create file in
50 `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
51 connect to callback hooks, for both Git and Mercurial.
52
53 |
54
55 :Q: **RhodeCode is slow for me, how can i make it faster?**
56 :A: See the :ref:`performance` section
57
58 For further questions search the `Issues tracker`_, or post a message in the
59 `google group rhodecode`_
60
61 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
62 .. _python: http://www.python.org/
63 .. _mercurial: http://mercurial.selenic.com/
64 .. _celery: http://celeryproject.org/
65 .. _rabbitmq: http://www.rabbitmq.com/
66 .. _python-ldap: http://www.python-ldap.org/
67 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
68 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
69 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
70 .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file
@@ -1,174 +1,175 b''
1 =========
1 =========
2 RhodeCode
2 RhodeCode
3 =========
3 =========
4
4
5 About
5 About
6 -----
6 -----
7
7
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
9 with a built in push/pull server and full text search and code-review.
9 with a built in push/pull server and full text search and code-review.
10 It works on http/https and has a built in permission/authentication system with
10 It works on http/https and has a built in permission/authentication system with
11 the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
11 the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
12 simple API so it's easy integrable with existing external systems.
12 simple API so it's easy integrable with existing external systems.
13
13
14 RhodeCode is similar in some respects to github_ or bitbucket_,
14 RhodeCode is similar in some respects to github_ or bitbucket_,
15 however RhodeCode can be run as standalone hosted application on your own server.
15 however RhodeCode can be run as standalone hosted application on your own server.
16 It is open source and donation ware and focuses more on providing a customized,
16 It is open source and donation ware and focuses more on providing a customized,
17 self administered interface for Mercurial_ and GIT_ repositories.
17 self administered interface for Mercurial_ and GIT_ repositories.
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
20 different version control systems.
20 different version control systems.
21
21
22 RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
22 RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
23
23
24 Installation
24 Installation
25 ------------
25 ------------
26 Stable releases of RhodeCode are best installed via::
26 Stable releases of RhodeCode are best installed via::
27
27
28 easy_install rhodecode
28 easy_install rhodecode
29
29
30 Or::
30 Or::
31
31
32 pip install rhodecode
32 pip install rhodecode
33
33
34 Detailed instructions and links may be found on the Installation page.
34 Detailed instructions and links may be found on the Installation page.
35
35
36 Please visit http://packages.python.org/RhodeCode/installation.html for
36 Please visit http://packages.python.org/RhodeCode/installation.html for
37 more details
37 more details
38
38
39 RhodeCode demo
39 RhodeCode demo
40 --------------
40 --------------
41
41
42 http://demo.rhodecode.org
42 http://demo.rhodecode.org
43
43
44 The default access is anonymous but you can login to an administrative account
44 The default access is anonymous but you can login to an administrative account
45 using the following credentials:
45 using the following credentials:
46
46
47 - username: demo
47 - username: demo
48 - password: demo12
48 - password: demo12
49
49
50 Source code
50 Source code
51 -----------
51 -----------
52
52
53 The latest sources can be obtained from official RhodeCode instance
53 The latest sources can be obtained from official RhodeCode instance
54 https://secure.rhodecode.org
54 https://secure.rhodecode.org
55
55
56
56
57 MIRRORS:
57 MIRRORS:
58
58
59 Issue tracker and sources at bitbucket_
59 Issue tracker and sources at bitbucket_
60
60
61 http://bitbucket.org/marcinkuzminski/rhodecode
61 http://bitbucket.org/marcinkuzminski/rhodecode
62
62
63 Sources at github_
63 Sources at github_
64
64
65 https://github.com/marcinkuzminski/rhodecode
65 https://github.com/marcinkuzminski/rhodecode
66
66
67
67
68 RhodeCode Features
68 RhodeCode Features
69 ------------------
69 ------------------
70
70
71 - Has its own middleware to handle mercurial_ protocol requests.
71 - Has its own middleware to handle mercurial_ protocol requests.
72 Each request can be logged and authenticated.
72 Each request can be logged and authenticated.
73 - Runs on threads unlike hgweb. You can make multiple pulls/pushes simultaneous.
73 - Runs on threads unlike hgweb. You can make multiple pulls/pushes simultaneous.
74 Supports http/https and LDAP
74 Supports http/https and LDAP
75 - Full permissions (private/read/write/admin) and authentication per project.
75 - Full permissions (private/read/write/admin) and authentication per project.
76 One account for web interface and mercurial_ push/pull/clone operations.
76 One account for web interface and mercurial_ push/pull/clone operations.
77 - Have built in users groups for easier permission management
77 - Have built in users groups for easier permission management
78 - Repository groups let you group repos and manage them easier.
78 - Repository groups let you group repos and manage them easier.
79 - Users can fork other users repo. RhodeCode have also compare view to see
79 - Users can fork other users repo. RhodeCode have also compare view to see
80 combined changeset for all changeset made within single push.
80 combined changeset for all changeset made within single push.
81 - Build in commit-api let's you add, edit and commit files right from RhodeCode
81 - Build in commit-api let's you add, edit and commit files right from RhodeCode
82 interface using simple editor or upload form for binaries.
82 interface using simple editor or upload form for binaries.
83 - Mako templates let's you customize the look and feel of the application.
83 - Mako templates let's you customize the look and feel of the application.
84 - Beautiful diffs, annotations and source code browsing all colored by pygments.
84 - Beautiful diffs, annotations and source code browsing all colored by pygments.
85 Raw diffs are made in git-diff format, including git_ binary-patches
85 Raw diffs are made in git-diff format, including git_ binary-patches
86 - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics
86 - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics
87 - Admin interface with user/permission management. Admin activity journal, logs
87 - Admin interface with user/permission management. Admin activity journal, logs
88 pulls, pushes, forks, registrations and other actions made by all users.
88 pulls, pushes, forks, registrations and other actions made by all users.
89 - Server side forks. It is possible to fork a project and modify it freely
89 - Server side forks. It is possible to fork a project and modify it freely
90 without breaking the main repository. You can even write Your own hooks
90 without breaking the main repository. You can even write Your own hooks
91 and install them
91 and install them
92 - code review with notification system, inline commenting, all parsed using
92 - code review with notification system, inline commenting, all parsed using
93 rst syntax
93 rst syntax
94 - rst and markdown README support for repositories
94 - rst and markdown README support for repositories
95 - Full text search powered by Whoosh on the source files, and file names.
95 - Full text search powered by Whoosh on the source files, and file names.
96 Build in indexing daemons, with optional incremental index build
96 Build in indexing daemons, with optional incremental index build
97 (no external search servers required all in one application)
97 (no external search servers required all in one application)
98 - Setup project descriptions and info inside built in db for easy, non
98 - Setup project descriptions and info inside built in db for easy, non
99 file-system operations
99 file-system operations
100 - Intelligent cache with invalidation after push or project change, provides
100 - Intelligent cache with invalidation after push or project change, provides
101 high performance and always up to date data.
101 high performance and always up to date data.
102 - Rss / atom feeds, gravatar support, download sources as zip/tar/gz
102 - Rss / atom feeds, gravatar support, download sources as zip/tar/gz
103 - Optional async tasks for speed and performance using celery_
103 - Optional async tasks for speed and performance using celery_
104 - Backup scripts can do backup of whole app and send it over scp to desired
104 - Backup scripts can do backup of whole app and send it over scp to desired
105 location
105 location
106 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
106 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
107
107
108
108
109 Incoming / Plans
109 Incoming / Plans
110 ----------------
110 ----------------
111
111
112 - Finer granular permissions per branch, repo group or subrepo
112 - Finer granular permissions per branch, repo group or subrepo
113 - pull requests and web based merges
113 - pull requests and web based merges
114 - per line file history
114 - per line file history
115 - SSH based authentication with server side key management
115 - SSH based authentication with server side key management
116 - Commit based built in wiki system
116 - Commit based built in wiki system
117 - More statistics and graph (global annotation + some more statistics)
117 - More statistics and graph (global annotation + some more statistics)
118 - Other advancements as development continues (or you can of course make
118 - Other advancements as development continues (or you can of course make
119 additions and or requests)
119 additions and or requests)
120
120
121 License
121 License
122 -------
122 -------
123
123
124 ``RhodeCode`` is released under the GPLv3 license.
124 ``RhodeCode`` is released under the GPLv3 license.
125
125
126
126
127 Getting help
127 Getting help
128 ------------
128 ------------
129
129
130 Listed bellow are various support resources that should help.
130 Listed bellow are various support resources that should help.
131
131
132 .. note::
132 .. note::
133
133
134 Please try to read the documentation before posting any issues
134 Please try to read the documentation before posting any issues, especially
135 the **troubleshooting section**
135
136
136 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
137 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
137 any questions.
138 any questions.
138
139
139 - Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
140 - Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
140
141
141
142
142 - Join #rhodecode on FreeNode (irc.freenode.net)
143 - Join #rhodecode on FreeNode (irc.freenode.net)
143 or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
144 or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
144
145
145 - You can also follow me on twitter **@marcinkuzminski** where i often post some
146 - You can also follow me on twitter **@marcinkuzminski** where i often post some
146 news about RhodeCode
147 news about RhodeCode
147
148
148
149
149 Online documentation
150 Online documentation
150 --------------------
151 --------------------
151
152
152 Online documentation for the current version of RhodeCode is available at
153 Online documentation for the current version of RhodeCode is available at
153 - http://packages.python.org/RhodeCode/
154 - http://packages.python.org/RhodeCode/
154 - http://rhodecode.readthedocs.org/en/latest/index.html
155 - http://rhodecode.readthedocs.org/en/latest/index.html
155
156
156 You may also build the documentation for yourself - go into ``docs/`` and run::
157 You may also build the documentation for yourself - go into ``docs/`` and run::
157
158
158 make html
159 make html
159
160
160 (You need to have sphinx_ installed to build the documentation. If you don't
161 (You need to have sphinx_ installed to build the documentation. If you don't
161 have sphinx_ installed you can install it via the command:
162 have sphinx_ installed you can install it via the command:
162 ``easy_install sphinx``)
163 ``easy_install sphinx``)
163
164
164 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
165 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
165 .. _python: http://www.python.org/
166 .. _python: http://www.python.org/
166 .. _sphinx: http://sphinx.pocoo.org/
167 .. _sphinx: http://sphinx.pocoo.org/
167 .. _mercurial: http://mercurial.selenic.com/
168 .. _mercurial: http://mercurial.selenic.com/
168 .. _bitbucket: http://bitbucket.org/
169 .. _bitbucket: http://bitbucket.org/
169 .. _github: http://github.com/
170 .. _github: http://github.com/
170 .. _subversion: http://subversion.tigris.org/
171 .. _subversion: http://subversion.tigris.org/
171 .. _git: http://git-scm.com/
172 .. _git: http://git-scm.com/
172 .. _celery: http://celeryproject.org/
173 .. _celery: http://celeryproject.org/
173 .. _Sphinx: http://sphinx.pocoo.org/
174 .. _Sphinx: http://sphinx.pocoo.org/
174 .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file
175 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -1,227 +1,227 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 #
2 #
3 # RhodeCode documentation build configuration file, created by
3 # RhodeCode documentation build configuration file, created by
4 # sphinx-quickstart on Sun Oct 10 16:46:37 2010.
4 # sphinx-quickstart on Sun Oct 10 16:46:37 2010.
5 #
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
7 #
8 # Note that not all possible configuration values are present in this
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
9 # autogenerated file.
10 #
10 #
11 # All configuration values have a default; values that are commented out
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
12 # serve to show the default.
13
13
14 import sys
14 import sys
15 import os
15 import os
16 import datetime
16 import datetime
17
17
18 # If extensions (or modules to document with autodoc) are in another directory,
18 # If extensions (or modules to document with autodoc) are in another directory,
19 # add these directories to sys.path here. If the directory is relative to the
19 # add these directories to sys.path here. If the directory is relative to the
20 # documentation root, use os.path.abspath to make it absolute, like shown here.
20 # documentation root, use os.path.abspath to make it absolute, like shown here.
21 sys.path.insert(0, os.path.abspath('..'))
21 sys.path.insert(0, os.path.abspath('..'))
22
22
23 # -- General configuration -----------------------------------------------------
23 # -- General configuration -----------------------------------------------------
24
24
25 # If your documentation needs a minimal Sphinx version, state it here.
25 # If your documentation needs a minimal Sphinx version, state it here.
26 #needs_sphinx = '1.0'
26 #needs_sphinx = '1.0'
27
27
28 # Add any Sphinx extension module names here, as strings. They can be extensions
28 # Add any Sphinx extension module names here, as strings. They can be extensions
29 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
30 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
31 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
31 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
32 'sphinx.ext.viewcode']
32 'sphinx.ext.viewcode']
33
33
34 # Add any paths that contain templates here, relative to this directory.
34 # Add any paths that contain templates here, relative to this directory.
35 templates_path = ['_templates']
35 templates_path = ['_templates']
36
36
37 # The suffix of source filenames.
37 # The suffix of source filenames.
38 source_suffix = '.rst'
38 source_suffix = '.rst'
39
39
40 # The encoding of source files.
40 # The encoding of source files.
41 #source_encoding = 'utf-8-sig'
41 #source_encoding = 'utf-8-sig'
42
42
43 # The master toctree document.
43 # The master toctree document.
44 master_doc = 'index'
44 master_doc = 'index'
45
45
46 # General information about the project.
46 # General information about the project.
47 project = u'RhodeCode'
47 project = u'RhodeCode'
48 copyright = u'%s, Marcin Kuzminski' % (datetime.datetime.now().year)
48 copyright = u'%s, Marcin Kuzminski' % (datetime.datetime.now().year)
49
49
50 # The version info for the project you're documenting, acts as replacement for
50 # The version info for the project you're documenting, acts as replacement for
51 # |version| and |release|, also used in various other places throughout the
51 # |version| and |release|, also used in various other places throughout the
52 # built documents.
52 # built documents.
53 #
53 #
54 # The short X.Y version.
54 # The short X.Y version.
55 root = os.path.dirname(os.path.dirname(__file__))
55 root = os.path.dirname(os.path.dirname(__file__))
56 sys.path.append(root)
56 sys.path.append(root)
57 from rhodecode import get_version, __version__
57 from rhodecode import __version__
58 version = get_version()
58 version = __version__
59 # The full version, including alpha/beta/rc tags.
59 # The full version, including alpha/beta/rc tags.
60 release = __version__
60 release = __version__
61
61
62 # The language for content autogenerated by Sphinx. Refer to documentation
62 # The language for content autogenerated by Sphinx. Refer to documentation
63 # for a list of supported languages.
63 # for a list of supported languages.
64 #language = None
64 #language = None
65
65
66 # There are two options for replacing |today|: either, you set today to some
66 # There are two options for replacing |today|: either, you set today to some
67 # non-false value, then it is used:
67 # non-false value, then it is used:
68 #today = ''
68 #today = ''
69 # Else, today_fmt is used as the format for a strftime call.
69 # Else, today_fmt is used as the format for a strftime call.
70 #today_fmt = '%B %d, %Y'
70 #today_fmt = '%B %d, %Y'
71
71
72 # List of patterns, relative to source directory, that match files and
72 # List of patterns, relative to source directory, that match files and
73 # directories to ignore when looking for source files.
73 # directories to ignore when looking for source files.
74 exclude_patterns = ['_build']
74 exclude_patterns = ['_build']
75
75
76 # The reST default role (used for this markup: `text`) to use for all documents.
76 # The reST default role (used for this markup: `text`) to use for all documents.
77 #default_role = None
77 #default_role = None
78
78
79 # If true, '()' will be appended to :func: etc. cross-reference text.
79 # If true, '()' will be appended to :func: etc. cross-reference text.
80 #add_function_parentheses = True
80 #add_function_parentheses = True
81
81
82 # If true, the current module name will be prepended to all description
82 # If true, the current module name will be prepended to all description
83 # unit titles (such as .. function::).
83 # unit titles (such as .. function::).
84 #add_module_names = True
84 #add_module_names = True
85
85
86 # If true, sectionauthor and moduleauthor directives will be shown in the
86 # If true, sectionauthor and moduleauthor directives will be shown in the
87 # output. They are ignored by default.
87 # output. They are ignored by default.
88 #show_authors = False
88 #show_authors = False
89
89
90 # The name of the Pygments (syntax highlighting) style to use.
90 # The name of the Pygments (syntax highlighting) style to use.
91 pygments_style = 'sphinx'
91 pygments_style = 'sphinx'
92
92
93 # A list of ignored prefixes for module index sorting.
93 # A list of ignored prefixes for module index sorting.
94 #modindex_common_prefix = []
94 #modindex_common_prefix = []
95
95
96
96
97 # -- Options for HTML output ---------------------------------------------------
97 # -- Options for HTML output ---------------------------------------------------
98
98
99 # The theme to use for HTML and HTML Help pages. See the documentation for
99 # The theme to use for HTML and HTML Help pages. See the documentation for
100 # a list of builtin themes.
100 # a list of builtin themes.
101 html_theme = 'nature'
101 html_theme = 'nature'
102
102
103 # Theme options are theme-specific and customize the look and feel of a theme
103 # Theme options are theme-specific and customize the look and feel of a theme
104 # further. For a list of options available for each theme, see the
104 # further. For a list of options available for each theme, see the
105 # documentation.
105 # documentation.
106 #html_theme_options = {}
106 #html_theme_options = {}
107
107
108 # Add any paths that contain custom themes here, relative to this directory.
108 # Add any paths that contain custom themes here, relative to this directory.
109 html_theme_path = ['theme']
109 html_theme_path = ['theme']
110
110
111 # The name for this set of Sphinx documents. If None, it defaults to
111 # The name for this set of Sphinx documents. If None, it defaults to
112 # "<project> v<release> documentation".
112 # "<project> v<release> documentation".
113 #html_title = None
113 #html_title = None
114
114
115 # A shorter title for the navigation bar. Default is the same as html_title.
115 # A shorter title for the navigation bar. Default is the same as html_title.
116 #html_short_title = None
116 #html_short_title = None
117
117
118 # The name of an image file (relative to this directory) to place at the top
118 # The name of an image file (relative to this directory) to place at the top
119 # of the sidebar.
119 # of the sidebar.
120 #html_logo = None
120 #html_logo = None
121
121
122 # The name of an image file (within the static path) to use as favicon of the
122 # The name of an image file (within the static path) to use as favicon of the
123 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
123 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
124 # pixels large.
124 # pixels large.
125 #html_favicon = None
125 #html_favicon = None
126
126
127 # Add any paths that contain custom static files (such as style sheets) here,
127 # Add any paths that contain custom static files (such as style sheets) here,
128 # relative to this directory. They are copied after the builtin static files,
128 # relative to this directory. They are copied after the builtin static files,
129 # so a file named "default.css" will overwrite the builtin "default.css".
129 # so a file named "default.css" will overwrite the builtin "default.css".
130 #html_static_path = ['_static']
130 #html_static_path = ['_static']
131
131
132 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
132 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
133 # using the given strftime format.
133 # using the given strftime format.
134 #html_last_updated_fmt = '%b %d, %Y'
134 #html_last_updated_fmt = '%b %d, %Y'
135
135
136 # If true, SmartyPants will be used to convert quotes and dashes to
136 # If true, SmartyPants will be used to convert quotes and dashes to
137 # typographically correct entities.
137 # typographically correct entities.
138 #html_use_smartypants = True
138 #html_use_smartypants = True
139
139
140 # Custom sidebar templates, maps document names to template names.
140 # Custom sidebar templates, maps document names to template names.
141 #html_sidebars = {}
141 #html_sidebars = {}
142
142
143 # Additional templates that should be rendered to pages, maps page names to
143 # Additional templates that should be rendered to pages, maps page names to
144 # template names.
144 # template names.
145 #html_additional_pages = {}
145 #html_additional_pages = {}
146
146
147 # If false, no module index is generated.
147 # If false, no module index is generated.
148 #html_domain_indices = True
148 #html_domain_indices = True
149
149
150 # If false, no index is generated.
150 # If false, no index is generated.
151 #html_use_index = True
151 #html_use_index = True
152
152
153 # If true, the index is split into individual pages for each letter.
153 # If true, the index is split into individual pages for each letter.
154 #html_split_index = False
154 #html_split_index = False
155
155
156 # If true, links to the reST sources are added to the pages.
156 # If true, links to the reST sources are added to the pages.
157 #html_show_sourcelink = True
157 #html_show_sourcelink = True
158
158
159 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
159 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
160 #html_show_sphinx = True
160 #html_show_sphinx = True
161
161
162 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
162 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
163 #html_show_copyright = True
163 #html_show_copyright = True
164
164
165 # If true, an OpenSearch description file will be output, and all pages will
165 # If true, an OpenSearch description file will be output, and all pages will
166 # contain a <link> tag referring to it. The value of this option must be the
166 # contain a <link> tag referring to it. The value of this option must be the
167 # base URL from which the finished HTML is served.
167 # base URL from which the finished HTML is served.
168 #html_use_opensearch = ''
168 #html_use_opensearch = ''
169
169
170 # This is the file name suffix for HTML files (e.g. ".xhtml").
170 # This is the file name suffix for HTML files (e.g. ".xhtml").
171 #html_file_suffix = None
171 #html_file_suffix = None
172
172
173 # Output file base name for HTML help builder.
173 # Output file base name for HTML help builder.
174 htmlhelp_basename = 'RhodeCodedoc'
174 htmlhelp_basename = 'RhodeCodedoc'
175
175
176
176
177 # -- Options for LaTeX output --------------------------------------------------
177 # -- Options for LaTeX output --------------------------------------------------
178
178
179 # The paper size ('letter' or 'a4').
179 # The paper size ('letter' or 'a4').
180 #latex_paper_size = 'letter'
180 #latex_paper_size = 'letter'
181
181
182 # The font size ('10pt', '11pt' or '12pt').
182 # The font size ('10pt', '11pt' or '12pt').
183 #latex_font_size = '10pt'
183 #latex_font_size = '10pt'
184
184
185 # Grouping the document tree into LaTeX files. List of tuples
185 # Grouping the document tree into LaTeX files. List of tuples
186 # (source start file, target name, title, author, documentclass [howto/manual]).
186 # (source start file, target name, title, author, documentclass [howto/manual]).
187 latex_documents = [
187 latex_documents = [
188 ('index', 'RhodeCode.tex', u'RhodeCode Documentation',
188 ('index', 'RhodeCode.tex', u'RhodeCode Documentation',
189 u'Marcin Kuzminski', 'manual'),
189 u'Marcin Kuzminski', 'manual'),
190 ]
190 ]
191
191
192 # The name of an image file (relative to this directory) to place at the top of
192 # The name of an image file (relative to this directory) to place at the top of
193 # the title page.
193 # the title page.
194 #latex_logo = None
194 #latex_logo = None
195
195
196 # For "manual" documents, if this is true, then toplevel headings are parts,
196 # For "manual" documents, if this is true, then toplevel headings are parts,
197 # not chapters.
197 # not chapters.
198 #latex_use_parts = False
198 #latex_use_parts = False
199
199
200 # If true, show page references after internal links.
200 # If true, show page references after internal links.
201 #latex_show_pagerefs = False
201 #latex_show_pagerefs = False
202
202
203 # If true, show URL addresses after external links.
203 # If true, show URL addresses after external links.
204 #latex_show_urls = False
204 #latex_show_urls = False
205
205
206 # Additional stuff for the LaTeX preamble.
206 # Additional stuff for the LaTeX preamble.
207 #latex_preamble = ''
207 #latex_preamble = ''
208
208
209 # Documents to append as an appendix to all manuals.
209 # Documents to append as an appendix to all manuals.
210 #latex_appendices = []
210 #latex_appendices = []
211
211
212 # If false, no module index is generated.
212 # If false, no module index is generated.
213 #latex_domain_indices = True
213 #latex_domain_indices = True
214
214
215
215
216 # -- Options for manual page output --------------------------------------------
216 # -- Options for manual page output --------------------------------------------
217
217
218 # One entry per manual page. List of tuples
218 # One entry per manual page. List of tuples
219 # (source start file, name, description, authors, manual section).
219 # (source start file, name, description, authors, manual section).
220 man_pages = [
220 man_pages = [
221 ('index', 'rhodecode', u'RhodeCode Documentation',
221 ('index', 'rhodecode', u'RhodeCode Documentation',
222 [u'Marcin Kuzminski'], 1)
222 [u'Marcin Kuzminski'], 1)
223 ]
223 ]
224
224
225
225
226 # Example configuration for intersphinx: refer to the Python standard library.
226 # Example configuration for intersphinx: refer to the Python standard library.
227 intersphinx_mapping = {'http://docs.python.org/': None}
227 intersphinx_mapping = {'http://docs.python.org/': None}
@@ -1,61 +1,62 b''
1 .. _index:
1 .. _index:
2
2
3 .. include:: ./../README.rst
3 .. include:: ./../README.rst
4
4
5 Users Guide
5 Users Guide
6 -----------
6 -----------
7
7
8 **Installation:**
8 **Installation:**
9
9
10 .. toctree::
10 .. toctree::
11 :maxdepth: 1
11 :maxdepth: 1
12
12
13 installation
13 installation
14 setup
14 setup
15 upgrade
15 upgrade
16
16
17 **Usage**
17 **Usage**
18
18
19 .. toctree::
19 .. toctree::
20 :maxdepth: 1
20 :maxdepth: 1
21
21
22 usage/general
22 usage/general
23 usage/git_support
23 usage/git_support
24 usage/performance
24 usage/performance
25 usage/statistics
25 usage/statistics
26 usage/backup
26 usage/backup
27 usage/debugging
27 usage/debugging
28 usage/troubleshooting
28
29
29 **Develop**
30 **Develop**
30
31
31 .. toctree::
32 .. toctree::
32 :maxdepth: 1
33 :maxdepth: 1
33
34
34 contributing
35 contributing
35 changelog
36 changelog
36
37
37 **API**
38 **API**
38
39
39 .. toctree::
40 .. toctree::
40 :maxdepth: 1
41 :maxdepth: 1
41
42
42 api/api
43 api/api
43 api/models
44 api/models
44
45
45
46
46 Other topics
47 Other topics
47 ------------
48 ------------
48
49
49 * :ref:`genindex`
50 * :ref:`genindex`
50 * :ref:`search`
51 * :ref:`search`
51
52
52 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
53 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
53 .. _python: http://www.python.org/
54 .. _python: http://www.python.org/
54 .. _django: http://www.djangoproject.com/
55 .. _django: http://www.djangoproject.com/
55 .. _mercurial: http://mercurial.selenic.com/
56 .. _mercurial: http://mercurial.selenic.com/
56 .. _bitbucket: http://bitbucket.org/
57 .. _bitbucket: http://bitbucket.org/
57 .. _subversion: http://subversion.tigris.org/
58 .. _subversion: http://subversion.tigris.org/
58 .. _git: http://git-scm.com/
59 .. _git: http://git-scm.com/
59 .. _celery: http://celeryproject.org/
60 .. _celery: http://celeryproject.org/
60 .. _Sphinx: http://sphinx.pocoo.org/
61 .. _Sphinx: http://sphinx.pocoo.org/
61 .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file
62 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -1,737 +1,703 b''
1 .. _setup:
1 .. _setup:
2
2
3 =====
3 =====
4 Setup
4 Setup
5 =====
5 =====
6
6
7
7
8 Setting up RhodeCode
8 Setting up RhodeCode
9 --------------------
9 --------------------
10
10
11 First, you will need to create a RhodeCode configuration file. Run the
11 First, you will need to create a RhodeCode configuration file. Run the
12 following command to do this::
12 following command to do this::
13
13
14 paster make-config RhodeCode production.ini
14 paster make-config RhodeCode production.ini
15
15
16 - This will create the file `production.ini` in the current directory. This
16 - This will create the file `production.ini` in the current directory. This
17 configuration file contains the various settings for RhodeCode, e.g proxy
17 configuration file contains the various settings for RhodeCode, e.g proxy
18 port, email settings, usage of static files, cache, celery settings and
18 port, email settings, usage of static files, cache, celery settings and
19 logging.
19 logging.
20
20
21
21
22 Next, you need to create the databases used by RhodeCode. I recommend that you
22 Next, you need to create the databases used by RhodeCode. I recommend that you
23 use postgresql or sqlite (default). If you choose a database other than the
23 use postgresql or sqlite (default). If you choose a database other than the
24 default ensure you properly adjust the db url in your production.ini
24 default ensure you properly adjust the db url in your production.ini
25 configuration file to use this other database. RhodeCode currently supports
25 configuration file to use this other database. RhodeCode currently supports
26 postgresql, sqlite and mysql databases. Create the database by running
26 postgresql, sqlite and mysql databases. Create the database by running
27 the following command::
27 the following command::
28
28
29 paster setup-rhodecode production.ini
29 paster setup-rhodecode production.ini
30
30
31 This will prompt you for a "root" path. This "root" path is the location where
31 This will prompt you for a "root" path. This "root" path is the location where
32 RhodeCode will store all of its repositories on the current machine. After
32 RhodeCode will store all of its repositories on the current machine. After
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
34 and password for the initial admin account which ``setup-rhodecode`` sets
34 and password for the initial admin account which ``setup-rhodecode`` sets
35 up for you.
35 up for you.
36
36
37 setup process can be fully automated, example for lazy::
37 setup process can be fully automated, example for lazy::
38
38
39 paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
39 paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
40
40
41
41
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
43 admin account. When choosing a root path you can either use a new empty
43 admin account. When choosing a root path you can either use a new empty
44 location, or a location which already contains existing repositories. If you
44 location, or a location which already contains existing repositories. If you
45 choose a location which contains existing repositories RhodeCode will simply
45 choose a location which contains existing repositories RhodeCode will simply
46 add all of the repositories at the chosen location to it's database.
46 add all of the repositories at the chosen location to it's database.
47 (Note: make sure you specify the correct path to the root).
47 (Note: make sure you specify the correct path to the root).
48 - Note: the given path for mercurial_ repositories **must** be write accessible
48 - Note: the given path for mercurial_ repositories **must** be write accessible
49 for the application. It's very important since the RhodeCode web interface
49 for the application. It's very important since the RhodeCode web interface
50 will work without write access, but when trying to do a push it will
50 will work without write access, but when trying to do a push it will
51 eventually fail with permission denied errors unless it has write access.
51 eventually fail with permission denied errors unless it has write access.
52
52
53 You are now ready to use RhodeCode, to run it simply execute::
53 You are now ready to use RhodeCode, to run it simply execute::
54
54
55 paster serve production.ini
55 paster serve production.ini
56
56
57 - This command runs the RhodeCode server. The web app should be available at the
57 - This command runs the RhodeCode server. The web app should be available at the
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
59 file created in previous step
59 file created in previous step
60 - Use the admin account you created above when running ``setup-rhodecode``
60 - Use the admin account you created above when running ``setup-rhodecode``
61 to login to the web app.
61 to login to the web app.
62 - The default permissions on each repository is read, and the owner is admin.
62 - The default permissions on each repository is read, and the owner is admin.
63 Remember to update these if needed.
63 Remember to update these if needed.
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
65 well as edit more advanced options on users and repositories
65 well as edit more advanced options on users and repositories
66
66
67 Optionally users can create `rcextensions` package that extends RhodeCode
67 Optionally users can create `rcextensions` package that extends RhodeCode
68 functionality. To do this simply execute::
68 functionality. To do this simply execute::
69
69
70 paster make-rcext production.ini
70 paster make-rcext production.ini
71
71
72 This will create `rcextensions` package in the same place that your `ini` file
72 This will create `rcextensions` package in the same place that your `ini` file
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
74 stats and add additional code into the push/pull/create repo hooks. For example
74 stats and add additional code into the push/pull/create repo hooks. For example
75 for sending signals to build-bots such as jenkins.
75 for sending signals to build-bots such as jenkins.
76 Please see the `__init__.py` file inside `rcextensions` package
76 Please see the `__init__.py` file inside `rcextensions` package
77 for more details.
77 for more details.
78
78
79
79
80 Using RhodeCode with SSH
80 Using RhodeCode with SSH
81 ------------------------
81 ------------------------
82
82
83 RhodeCode currently only hosts repositories using http and https. (The addition
83 RhodeCode currently only hosts repositories using http and https. (The addition
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
85 parallel with RhodeCode. (Repository access via ssh is a standard "out of
85 parallel with RhodeCode. (Repository access via ssh is a standard "out of
86 the box" feature of mercurial_ and you can use this to access any of the
86 the box" feature of mercurial_ and you can use this to access any of the
87 repositories that RhodeCode is hosting. See PublishingRepositories_)
87 repositories that RhodeCode is hosting. See PublishingRepositories_)
88
88
89 RhodeCode repository structures are kept in directories with the same name
89 RhodeCode repository structures are kept in directories with the same name
90 as the project. When using repository groups, each group is a subdirectory.
90 as the project. When using repository groups, each group is a subdirectory.
91 This allows you to easily use ssh for accessing repositories.
91 This allows you to easily use ssh for accessing repositories.
92
92
93 In order to use ssh you need to make sure that your web-server and the users
93 In order to use ssh you need to make sure that your web-server and the users
94 login accounts have the correct permissions set on the appropriate directories.
94 login accounts have the correct permissions set on the appropriate directories.
95 (Note that these permissions are independent of any permissions you have set up
95 (Note that these permissions are independent of any permissions you have set up
96 using the RhodeCode web interface.)
96 using the RhodeCode web interface.)
97
97
98 If your main directory (the same as set in RhodeCode settings) is for example
98 If your main directory (the same as set in RhodeCode settings) is for example
99 set to **/home/hg** and the repository you are using is named `rhodecode`, then
99 set to **/home/hg** and the repository you are using is named `rhodecode`, then
100 to clone via ssh you should run::
100 to clone via ssh you should run::
101
101
102 hg clone ssh://user@server.com/home/hg/rhodecode
102 hg clone ssh://user@server.com/home/hg/rhodecode
103
103
104 Using other external tools such as mercurial-server_ or using ssh key based
104 Using other external tools such as mercurial-server_ or using ssh key based
105 authentication is fully supported.
105 authentication is fully supported.
106
106
107 Note: In an advanced setup, in order for your ssh access to use the same
107 Note: In an advanced setup, in order for your ssh access to use the same
108 permissions as set up via the RhodeCode web interface, you can create an
108 permissions as set up via the RhodeCode web interface, you can create an
109 authentication hook to connect to the rhodecode db and runs check functions for
109 authentication hook to connect to the rhodecode db and runs check functions for
110 permissions against that.
110 permissions against that.
111
111
112 Setting up Whoosh full text search
112 Setting up Whoosh full text search
113 ----------------------------------
113 ----------------------------------
114
114
115 Starting from version 1.1 the whoosh index can be build by using the paster
115 Starting from version 1.1 the whoosh index can be build by using the paster
116 command ``make-index``. To use ``make-index`` you must specify the configuration
116 command ``make-index``. To use ``make-index`` you must specify the configuration
117 file that stores the location of the index. You may specify the location of the
117 file that stores the location of the index. You may specify the location of the
118 repositories (`--repo-location`). If not specified, this value is retrieved
118 repositories (`--repo-location`). If not specified, this value is retrieved
119 from the RhodeCode database. This was required prior to 1.2. Starting from
119 from the RhodeCode database. This was required prior to 1.2. Starting from
120 version 1.2 it is also possible to specify a comma separated list of
120 version 1.2 it is also possible to specify a comma separated list of
121 repositories (`--index-only`) to build index only on chooses repositories
121 repositories (`--index-only`) to build index only on chooses repositories
122 skipping any other found in repos location
122 skipping any other found in repos location
123
123
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
125 the `-f` option, indexing will run always in "incremental" mode.
125 the `-f` option, indexing will run always in "incremental" mode.
126
126
127 For an incremental index build use::
127 For an incremental index build use::
128
128
129 paster make-index production.ini
129 paster make-index production.ini
130
130
131 For a full index rebuild use::
131 For a full index rebuild use::
132
132
133 paster make-index production.ini -f
133 paster make-index production.ini -f
134
134
135
135
136 building index just for chosen repositories is possible with such command::
136 building index just for chosen repositories is possible with such command::
137
137
138 paster make-index production.ini --index-only=vcs,rhodecode
138 paster make-index production.ini --index-only=vcs,rhodecode
139
139
140
140
141 In order to do periodical index builds and keep your index always up to date.
141 In order to do periodical index builds and keep your index always up to date.
142 It's recommended to do a crontab entry for incremental indexing.
142 It's recommended to do a crontab entry for incremental indexing.
143 An example entry might look like this::
143 An example entry might look like this::
144
144
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
146
146
147 When using incremental mode (the default) whoosh will check the last
147 When using incremental mode (the default) whoosh will check the last
148 modification date of each file and add it to be reindexed if a newer file is
148 modification date of each file and add it to be reindexed if a newer file is
149 available. The indexing daemon checks for any removed files and removes them
149 available. The indexing daemon checks for any removed files and removes them
150 from index.
150 from index.
151
151
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
153 or in the admin panel you can check `build from scratch` flag.
153 or in the admin panel you can check `build from scratch` flag.
154
154
155
155
156 Setting up LDAP support
156 Setting up LDAP support
157 -----------------------
157 -----------------------
158
158
159 RhodeCode starting from version 1.1 supports ldap authentication. In order
159 RhodeCode starting from version 1.1 supports ldap authentication. In order
160 to use LDAP, you have to install the python-ldap_ package. This package is
160 to use LDAP, you have to install the python-ldap_ package. This package is
161 available via pypi, so you can install it by running
161 available via pypi, so you can install it by running
162
162
163 using easy_install::
163 using easy_install::
164
164
165 easy_install python-ldap
165 easy_install python-ldap
166
166
167 using pip::
167 using pip::
168
168
169 pip install python-ldap
169 pip install python-ldap
170
170
171 .. note::
171 .. note::
172 python-ldap requires some certain libs on your system, so before installing
172 python-ldap requires some certain libs on your system, so before installing
173 it check that you have at least `openldap`, and `sasl` libraries.
173 it check that you have at least `openldap`, and `sasl` libraries.
174
174
175 LDAP settings are located in admin->ldap section,
175 LDAP settings are located in admin->ldap section,
176
176
177 Here's a typical ldap setup::
177 Here's a typical ldap setup::
178
178
179 Connection settings
179 Connection settings
180 Enable LDAP = checked
180 Enable LDAP = checked
181 Host = host.example.org
181 Host = host.example.org
182 Port = 389
182 Port = 389
183 Account = <account>
183 Account = <account>
184 Password = <password>
184 Password = <password>
185 Connection Security = LDAPS connection
185 Connection Security = LDAPS connection
186 Certificate Checks = DEMAND
186 Certificate Checks = DEMAND
187
187
188 Search settings
188 Search settings
189 Base DN = CN=users,DC=host,DC=example,DC=org
189 Base DN = CN=users,DC=host,DC=example,DC=org
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
191 LDAP Search Scope = SUBTREE
191 LDAP Search Scope = SUBTREE
192
192
193 Attribute mappings
193 Attribute mappings
194 Login Attribute = uid
194 Login Attribute = uid
195 First Name Attribute = firstName
195 First Name Attribute = firstName
196 Last Name Attribute = lastName
196 Last Name Attribute = lastName
197 E-mail Attribute = mail
197 E-mail Attribute = mail
198
198
199 .. _enable_ldap:
199 .. _enable_ldap:
200
200
201 Enable LDAP : required
201 Enable LDAP : required
202 Whether to use LDAP for authenticating users.
202 Whether to use LDAP for authenticating users.
203
203
204 .. _ldap_host:
204 .. _ldap_host:
205
205
206 Host : required
206 Host : required
207 LDAP server hostname or IP address.
207 LDAP server hostname or IP address.
208
208
209 .. _Port:
209 .. _Port:
210
210
211 Port : required
211 Port : required
212 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
212 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
213
213
214 .. _ldap_account:
214 .. _ldap_account:
215
215
216 Account : optional
216 Account : optional
217 Only required if the LDAP server does not allow anonymous browsing of
217 Only required if the LDAP server does not allow anonymous browsing of
218 records. This should be a special account for record browsing. This
218 records. This should be a special account for record browsing. This
219 will require `LDAP Password`_ below.
219 will require `LDAP Password`_ below.
220
220
221 .. _LDAP Password:
221 .. _LDAP Password:
222
222
223 Password : optional
223 Password : optional
224 Only required if the LDAP server does not allow anonymous browsing of
224 Only required if the LDAP server does not allow anonymous browsing of
225 records.
225 records.
226
226
227 .. _Enable LDAPS:
227 .. _Enable LDAPS:
228
228
229 Connection Security : required
229 Connection Security : required
230 Defines the connection to LDAP server
230 Defines the connection to LDAP server
231
231
232 No encryption
232 No encryption
233 Plain non encrypted connection
233 Plain non encrypted connection
234
234
235 LDAPS connection
235 LDAPS connection
236 Enable ldaps connection. It will likely require `Port`_ to be set to
236 Enable ldaps connection. It will likely require `Port`_ to be set to
237 a different value (standard LDAPS port is 636). When LDAPS is enabled
237 a different value (standard LDAPS port is 636). When LDAPS is enabled
238 then `Certificate Checks`_ is required.
238 then `Certificate Checks`_ is required.
239
239
240 START_TLS on LDAP connection
240 START_TLS on LDAP connection
241 START TLS connection
241 START TLS connection
242
242
243 .. _Certificate Checks:
243 .. _Certificate Checks:
244
244
245 Certificate Checks : optional
245 Certificate Checks : optional
246 How SSL certificates verification is handled - this is only useful when
246 How SSL certificates verification is handled - this is only useful when
247 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
247 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
248 while the other options are susceptible to man-in-the-middle attacks. SSL
248 while the other options are susceptible to man-in-the-middle attacks. SSL
249 certificates can be installed to /etc/openldap/cacerts so that the
249 certificates can be installed to /etc/openldap/cacerts so that the
250 DEMAND or HARD options can be used with self-signed certificates or
250 DEMAND or HARD options can be used with self-signed certificates or
251 certificates that do not have traceable certificates of authority.
251 certificates that do not have traceable certificates of authority.
252
252
253 NEVER
253 NEVER
254 A serve certificate will never be requested or checked.
254 A serve certificate will never be requested or checked.
255
255
256 ALLOW
256 ALLOW
257 A server certificate is requested. Failure to provide a
257 A server certificate is requested. Failure to provide a
258 certificate or providing a bad certificate will not terminate the
258 certificate or providing a bad certificate will not terminate the
259 session.
259 session.
260
260
261 TRY
261 TRY
262 A server certificate is requested. Failure to provide a
262 A server certificate is requested. Failure to provide a
263 certificate does not halt the session; providing a bad certificate
263 certificate does not halt the session; providing a bad certificate
264 halts the session.
264 halts the session.
265
265
266 DEMAND
266 DEMAND
267 A server certificate is requested and must be provided and
267 A server certificate is requested and must be provided and
268 authenticated for the session to proceed.
268 authenticated for the session to proceed.
269
269
270 HARD
270 HARD
271 The same as DEMAND.
271 The same as DEMAND.
272
272
273 .. _Base DN:
273 .. _Base DN:
274
274
275 Base DN : required
275 Base DN : required
276 The Distinguished Name (DN) where searches for users will be performed.
276 The Distinguished Name (DN) where searches for users will be performed.
277 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
277 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
278
278
279 .. _LDAP Filter:
279 .. _LDAP Filter:
280
280
281 LDAP Filter : optional
281 LDAP Filter : optional
282 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
282 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
283 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
283 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
284 which LDAP objects are identified as representing Users for
284 which LDAP objects are identified as representing Users for
285 authentication. The filter is augmented by `Login Attribute`_ below.
285 authentication. The filter is augmented by `Login Attribute`_ below.
286 This can commonly be left blank.
286 This can commonly be left blank.
287
287
288 .. _LDAP Search Scope:
288 .. _LDAP Search Scope:
289
289
290 LDAP Search Scope : required
290 LDAP Search Scope : required
291 This limits how far LDAP will search for a matching object.
291 This limits how far LDAP will search for a matching object.
292
292
293 BASE
293 BASE
294 Only allows searching of `Base DN`_ and is usually not what you
294 Only allows searching of `Base DN`_ and is usually not what you
295 want.
295 want.
296
296
297 ONELEVEL
297 ONELEVEL
298 Searches all entries under `Base DN`_, but not Base DN itself.
298 Searches all entries under `Base DN`_, but not Base DN itself.
299
299
300 SUBTREE
300 SUBTREE
301 Searches all entries below `Base DN`_, but not Base DN itself.
301 Searches all entries below `Base DN`_, but not Base DN itself.
302 When using SUBTREE `LDAP Filter`_ is useful to limit object
302 When using SUBTREE `LDAP Filter`_ is useful to limit object
303 location.
303 location.
304
304
305 .. _Login Attribute:
305 .. _Login Attribute:
306
306
307 Login Attribute : required
307 Login Attribute : required
308 The LDAP record attribute that will be matched as the USERNAME or
308 The LDAP record attribute that will be matched as the USERNAME or
309 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
309 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
310 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
310 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
311 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
311 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
312 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
312 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
313 ::
313 ::
314
314
315 (&(LDAPFILTER)(uid=jsmith))
315 (&(LDAPFILTER)(uid=jsmith))
316
316
317 .. _ldap_attr_firstname:
317 .. _ldap_attr_firstname:
318
318
319 First Name Attribute : required
319 First Name Attribute : required
320 The LDAP record attribute which represents the user's first name.
320 The LDAP record attribute which represents the user's first name.
321
321
322 .. _ldap_attr_lastname:
322 .. _ldap_attr_lastname:
323
323
324 Last Name Attribute : required
324 Last Name Attribute : required
325 The LDAP record attribute which represents the user's last name.
325 The LDAP record attribute which represents the user's last name.
326
326
327 .. _ldap_attr_email:
327 .. _ldap_attr_email:
328
328
329 Email Attribute : required
329 Email Attribute : required
330 The LDAP record attribute which represents the user's email address.
330 The LDAP record attribute which represents the user's email address.
331
331
332 If all data are entered correctly, and python-ldap_ is properly installed
332 If all data are entered correctly, and python-ldap_ is properly installed
333 users should be granted access to RhodeCode with ldap accounts. At this
333 users should be granted access to RhodeCode with ldap accounts. At this
334 time user information is copied from LDAP into the RhodeCode user database.
334 time user information is copied from LDAP into the RhodeCode user database.
335 This means that updates of an LDAP user object may not be reflected as a
335 This means that updates of an LDAP user object may not be reflected as a
336 user update in RhodeCode.
336 user update in RhodeCode.
337
337
338 If You have problems with LDAP access and believe You entered correct
338 If You have problems with LDAP access and believe You entered correct
339 information check out the RhodeCode logs, any error messages sent from LDAP
339 information check out the RhodeCode logs, any error messages sent from LDAP
340 will be saved there.
340 will be saved there.
341
341
342 Active Directory
342 Active Directory
343 ''''''''''''''''
343 ''''''''''''''''
344
344
345 RhodeCode can use Microsoft Active Directory for user authentication. This
345 RhodeCode can use Microsoft Active Directory for user authentication. This
346 is done through an LDAP or LDAPS connection to Active Directory. The
346 is done through an LDAP or LDAPS connection to Active Directory. The
347 following LDAP configuration settings are typical for using Active
347 following LDAP configuration settings are typical for using Active
348 Directory ::
348 Directory ::
349
349
350 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
350 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
351 Login Attribute = sAMAccountName
351 Login Attribute = sAMAccountName
352 First Name Attribute = givenName
352 First Name Attribute = givenName
353 Last Name Attribute = sn
353 Last Name Attribute = sn
354 E-mail Attribute = mail
354 E-mail Attribute = mail
355
355
356 All other LDAP settings will likely be site-specific and should be
356 All other LDAP settings will likely be site-specific and should be
357 appropriately configured.
357 appropriately configured.
358
358
359
359
360 Authentication by container or reverse-proxy
360 Authentication by container or reverse-proxy
361 --------------------------------------------
361 --------------------------------------------
362
362
363 Starting with version 1.3, RhodeCode supports delegating the authentication
363 Starting with version 1.3, RhodeCode supports delegating the authentication
364 of users to its WSGI container, or to a reverse-proxy server through which all
364 of users to its WSGI container, or to a reverse-proxy server through which all
365 clients access the application.
365 clients access the application.
366
366
367 When these authentication methods are enabled in RhodeCode, it uses the
367 When these authentication methods are enabled in RhodeCode, it uses the
368 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
368 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
369 perform the authentication itself. The authorization, however, is still done by
369 perform the authentication itself. The authorization, however, is still done by
370 RhodeCode according to its settings.
370 RhodeCode according to its settings.
371
371
372 When a user logs in for the first time using these authentication methods,
372 When a user logs in for the first time using these authentication methods,
373 a matching user account is created in RhodeCode with default permissions. An
373 a matching user account is created in RhodeCode with default permissions. An
374 administrator can then modify it using RhodeCode's admin interface.
374 administrator can then modify it using RhodeCode's admin interface.
375 It's also possible for an administrator to create accounts and configure their
375 It's also possible for an administrator to create accounts and configure their
376 permissions before the user logs in for the first time.
376 permissions before the user logs in for the first time.
377
377
378 Container-based authentication
378 Container-based authentication
379 ''''''''''''''''''''''''''''''
379 ''''''''''''''''''''''''''''''
380
380
381 In a container-based authentication setup, RhodeCode reads the user name from
381 In a container-based authentication setup, RhodeCode reads the user name from
382 the ``REMOTE_USER`` server variable provided by the WSGI container.
382 the ``REMOTE_USER`` server variable provided by the WSGI container.
383
383
384 After setting up your container (see `Apache's WSGI config`_), you'd need
384 After setting up your container (see `Apache's WSGI config`_), you'd need
385 to configure it to require authentication on the location configured for
385 to configure it to require authentication on the location configured for
386 RhodeCode.
386 RhodeCode.
387
387
388 In order for RhodeCode to start using the provided username, you should set the
388 In order for RhodeCode to start using the provided username, you should set the
389 following in the [app:main] section of your .ini file::
389 following in the [app:main] section of your .ini file::
390
390
391 container_auth_enabled = true
391 container_auth_enabled = true
392
392
393
393
394 Proxy pass-through authentication
394 Proxy pass-through authentication
395 '''''''''''''''''''''''''''''''''
395 '''''''''''''''''''''''''''''''''
396
396
397 In a proxy pass-through authentication setup, RhodeCode reads the user name
397 In a proxy pass-through authentication setup, RhodeCode reads the user name
398 from the ``X-Forwarded-User`` request header, which should be configured to be
398 from the ``X-Forwarded-User`` request header, which should be configured to be
399 sent by the reverse-proxy server.
399 sent by the reverse-proxy server.
400
400
401 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
401 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
402 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
402 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
403 configure the authentication and add the username in a request header named
403 configure the authentication and add the username in a request header named
404 ``X-Forwarded-User``.
404 ``X-Forwarded-User``.
405
405
406 For example, the following config section for Apache sets a subdirectory in a
406 For example, the following config section for Apache sets a subdirectory in a
407 reverse-proxy setup with basic auth::
407 reverse-proxy setup with basic auth::
408
408
409 <Location /<someprefix> >
409 <Location /<someprefix> >
410 ProxyPass http://127.0.0.1:5000/<someprefix>
410 ProxyPass http://127.0.0.1:5000/<someprefix>
411 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
411 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
412 SetEnvIf X-Url-Scheme https HTTPS=1
412 SetEnvIf X-Url-Scheme https HTTPS=1
413
413
414 AuthType Basic
414 AuthType Basic
415 AuthName "RhodeCode authentication"
415 AuthName "RhodeCode authentication"
416 AuthUserFile /home/web/rhodecode/.htpasswd
416 AuthUserFile /home/web/rhodecode/.htpasswd
417 require valid-user
417 require valid-user
418
418
419 RequestHeader unset X-Forwarded-User
419 RequestHeader unset X-Forwarded-User
420
420
421 RewriteEngine On
421 RewriteEngine On
422 RewriteCond %{LA-U:REMOTE_USER} (.+)
422 RewriteCond %{LA-U:REMOTE_USER} (.+)
423 RewriteRule .* - [E=RU:%1]
423 RewriteRule .* - [E=RU:%1]
424 RequestHeader set X-Forwarded-User %{RU}e
424 RequestHeader set X-Forwarded-User %{RU}e
425 </Location>
425 </Location>
426
426
427 In order for RhodeCode to start using the forwarded username, you should set
427 In order for RhodeCode to start using the forwarded username, you should set
428 the following in the [app:main] section of your .ini file::
428 the following in the [app:main] section of your .ini file::
429
429
430 proxypass_auth_enabled = true
430 proxypass_auth_enabled = true
431
431
432 .. note::
432 .. note::
433 If you enable proxy pass-through authentication, make sure your server is
433 If you enable proxy pass-through authentication, make sure your server is
434 only accessible through the proxy. Otherwise, any client would be able to
434 only accessible through the proxy. Otherwise, any client would be able to
435 forge the authentication header and could effectively become authenticated
435 forge the authentication header and could effectively become authenticated
436 using any account of their liking.
436 using any account of their liking.
437
437
438 Integration with Issue trackers
438 Integration with Issue trackers
439 -------------------------------
439 -------------------------------
440
440
441 RhodeCode provides a simple integration with issue trackers. It's possible
441 RhodeCode provides a simple integration with issue trackers. It's possible
442 to define a regular expression that will fetch issue id stored in commit
442 to define a regular expression that will fetch issue id stored in commit
443 messages and replace that with an url to this issue. To enable this simply
443 messages and replace that with an url to this issue. To enable this simply
444 uncomment following variables in the ini file::
444 uncomment following variables in the ini file::
445
445
446 url_pat = (?:^#|\s#)(\w+)
446 url_pat = (?:^#|\s#)(\w+)
447 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
447 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
448 issue_prefix = #
448 issue_prefix = #
449
449
450 `url_pat` is the regular expression that will fetch issues from commit messages.
450 `url_pat` is the regular expression that will fetch issues from commit messages.
451 Default regex will match issues in format of #<number> eg. #300.
451 Default regex will match issues in format of #<number> eg. #300.
452
452
453 Matched issues will be replace with the link specified as `issue_server_link`
453 Matched issues will be replace with the link specified as `issue_server_link`
454 {id} will be replaced with issue id, and {repo} with repository name.
454 {id} will be replaced with issue id, and {repo} with repository name.
455 Since the # is striped `issue_prefix` is added as a prefix to url.
455 Since the # is striped `issue_prefix` is added as a prefix to url.
456 `issue_prefix` can be something different than # if you pass
456 `issue_prefix` can be something different than # if you pass
457 ISSUE- as issue prefix this will generate an url in format::
457 ISSUE- as issue prefix this will generate an url in format::
458
458
459 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
459 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
460
460
461 Hook management
461 Hook management
462 ---------------
462 ---------------
463
463
464 Hooks can be managed in similar way to this used in .hgrc files.
464 Hooks can be managed in similar way to this used in .hgrc files.
465 To access hooks setting click `advanced setup` on Hooks section of Mercurial
465 To access hooks setting click `advanced setup` on Hooks section of Mercurial
466 Settings in Admin.
466 Settings in Admin.
467
467
468 There are 4 built in hooks that cannot be changed (only enable/disable by
468 There are 4 built in hooks that cannot be changed (only enable/disable by
469 checkboxes on previos section).
469 checkboxes on previos section).
470 To add another custom hook simply fill in first section with
470 To add another custom hook simply fill in first section with
471 <name>.<hook_type> and the second one with hook path. Example hooks
471 <name>.<hook_type> and the second one with hook path. Example hooks
472 can be found at *rhodecode.lib.hooks*.
472 can be found at *rhodecode.lib.hooks*.
473
473
474
474
475 Changing default encoding
475 Changing default encoding
476 -------------------------
476 -------------------------
477
477
478 By default RhodeCode uses utf8 encoding, starting from 1.3 series this
478 By default RhodeCode uses utf8 encoding, starting from 1.3 series this
479 can be changed, simply edit default_encoding in .ini file to desired one.
479 can be changed, simply edit default_encoding in .ini file to desired one.
480 This affects many parts in rhodecode including commiters names, filenames,
480 This affects many parts in rhodecode including commiters names, filenames,
481 encoding of commit messages. In addition RhodeCode can detect if `chardet`
481 encoding of commit messages. In addition RhodeCode can detect if `chardet`
482 library is installed. If `chardet` is detected RhodeCode will fallback to it
482 library is installed. If `chardet` is detected RhodeCode will fallback to it
483 when there are encode/decode errors.
483 when there are encode/decode errors.
484
484
485
485
486 Setting Up Celery
486 Setting Up Celery
487 -----------------
487 -----------------
488
488
489 Since version 1.1 celery is configured by the rhodecode ini configuration files.
489 Since version 1.1 celery is configured by the rhodecode ini configuration files.
490 Simply set use_celery=true in the ini file then add / change the configuration
490 Simply set use_celery=true in the ini file then add / change the configuration
491 variables inside the ini file.
491 variables inside the ini file.
492
492
493 Remember that the ini files use the format with '.' not with '_' like celery.
493 Remember that the ini files use the format with '.' not with '_' like celery.
494 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
494 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
495 the config file.
495 the config file.
496
496
497 In order to start using celery run::
497 In order to start using celery run::
498
498
499 paster celeryd <configfile.ini>
499 paster celeryd <configfile.ini>
500
500
501
501
502 .. note::
502 .. note::
503 Make sure you run this command from the same virtualenv, and with the same
503 Make sure you run this command from the same virtualenv, and with the same
504 user that rhodecode runs.
504 user that rhodecode runs.
505
505
506 HTTPS support
506 HTTPS support
507 -------------
507 -------------
508
508
509 There are two ways to enable https:
509 There are two ways to enable https:
510
510
511 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
511 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
512 recognize this headers and make proper https redirections
512 recognize this headers and make proper https redirections
513 - Alternatively, change the `force_https = true` flag in the ini configuration
513 - Alternatively, change the `force_https = true` flag in the ini configuration
514 to force using https, no headers are needed than to enable https
514 to force using https, no headers are needed than to enable https
515
515
516
516
517 Nginx virtual host example
517 Nginx virtual host example
518 --------------------------
518 --------------------------
519
519
520 Sample config for nginx using proxy::
520 Sample config for nginx using proxy::
521
521
522 upstream rc {
522 upstream rc {
523 server 127.0.0.1:5000;
523 server 127.0.0.1:5000;
524 # add more instances for load balancing
524 # add more instances for load balancing
525 #server 127.0.0.1:5001;
525 #server 127.0.0.1:5001;
526 #server 127.0.0.1:5002;
526 #server 127.0.0.1:5002;
527 }
527 }
528
528
529 server {
529 server {
530 listen 80;
530 listen 80;
531 server_name hg.myserver.com;
531 server_name hg.myserver.com;
532 access_log /var/log/nginx/rhodecode.access.log;
532 access_log /var/log/nginx/rhodecode.access.log;
533 error_log /var/log/nginx/rhodecode.error.log;
533 error_log /var/log/nginx/rhodecode.error.log;
534
534
535 location / {
535 location / {
536 try_files $uri @rhode;
536 try_files $uri @rhode;
537 }
537 }
538
538
539 location @rhode {
539 location @rhode {
540 proxy_pass http://rc;
540 proxy_pass http://rc;
541 include /etc/nginx/proxy.conf;
541 include /etc/nginx/proxy.conf;
542 }
542 }
543
543
544 }
544 }
545
545
546 Here's the proxy.conf. It's tuned so it will not timeout on long
546 Here's the proxy.conf. It's tuned so it will not timeout on long
547 pushes or large pushes::
547 pushes or large pushes::
548
548
549 proxy_redirect off;
549 proxy_redirect off;
550 proxy_set_header Host $host;
550 proxy_set_header Host $host;
551 proxy_set_header X-Url-Scheme $scheme;
551 proxy_set_header X-Url-Scheme $scheme;
552 proxy_set_header X-Host $http_host;
552 proxy_set_header X-Host $http_host;
553 proxy_set_header X-Real-IP $remote_addr;
553 proxy_set_header X-Real-IP $remote_addr;
554 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
554 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
555 proxy_set_header Proxy-host $proxy_host;
555 proxy_set_header Proxy-host $proxy_host;
556 client_max_body_size 400m;
556 client_max_body_size 400m;
557 client_body_buffer_size 128k;
557 client_body_buffer_size 128k;
558 proxy_buffering off;
558 proxy_buffering off;
559 proxy_connect_timeout 7200;
559 proxy_connect_timeout 7200;
560 proxy_send_timeout 7200;
560 proxy_send_timeout 7200;
561 proxy_read_timeout 7200;
561 proxy_read_timeout 7200;
562 proxy_buffers 8 32k;
562 proxy_buffers 8 32k;
563
563
564 Also, when using root path with nginx you might set the static files to false
564 Also, when using root path with nginx you might set the static files to false
565 in the production.ini file::
565 in the production.ini file::
566
566
567 [app:main]
567 [app:main]
568 use = egg:rhodecode
568 use = egg:rhodecode
569 full_stack = true
569 full_stack = true
570 static_files = false
570 static_files = false
571 lang=en
571 lang=en
572 cache_dir = %(here)s/data
572 cache_dir = %(here)s/data
573
573
574 In order to not have the statics served by the application. This improves speed.
574 In order to not have the statics served by the application. This improves speed.
575
575
576
576
577 Apache virtual host reverse proxy example
577 Apache virtual host reverse proxy example
578 -----------------------------------------
578 -----------------------------------------
579
579
580 Here is a sample configuration file for apache using proxy::
580 Here is a sample configuration file for apache using proxy::
581
581
582 <VirtualHost *:80>
582 <VirtualHost *:80>
583 ServerName hg.myserver.com
583 ServerName hg.myserver.com
584 ServerAlias hg.myserver.com
584 ServerAlias hg.myserver.com
585
585
586 <Proxy *>
586 <Proxy *>
587 Order allow,deny
587 Order allow,deny
588 Allow from all
588 Allow from all
589 </Proxy>
589 </Proxy>
590
590
591 #important !
591 #important !
592 #Directive to properly generate url (clone url) for pylons
592 #Directive to properly generate url (clone url) for pylons
593 ProxyPreserveHost On
593 ProxyPreserveHost On
594
594
595 #rhodecode instance
595 #rhodecode instance
596 ProxyPass / http://127.0.0.1:5000/
596 ProxyPass / http://127.0.0.1:5000/
597 ProxyPassReverse / http://127.0.0.1:5000/
597 ProxyPassReverse / http://127.0.0.1:5000/
598
598
599 #to enable https use line below
599 #to enable https use line below
600 #SetEnvIf X-Url-Scheme https HTTPS=1
600 #SetEnvIf X-Url-Scheme https HTTPS=1
601
601
602 </VirtualHost>
602 </VirtualHost>
603
603
604
604
605 Additional tutorial
605 Additional tutorial
606 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
606 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
607
607
608
608
609 Apache as subdirectory
609 Apache as subdirectory
610 ----------------------
610 ----------------------
611
611
612 Apache subdirectory part::
612 Apache subdirectory part::
613
613
614 <Location /<someprefix> >
614 <Location /<someprefix> >
615 ProxyPass http://127.0.0.1:5000/<someprefix>
615 ProxyPass http://127.0.0.1:5000/<someprefix>
616 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
616 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
617 SetEnvIf X-Url-Scheme https HTTPS=1
617 SetEnvIf X-Url-Scheme https HTTPS=1
618 </Location>
618 </Location>
619
619
620 Besides the regular apache setup you will need to add the following line
620 Besides the regular apache setup you will need to add the following line
621 into [app:main] section of your .ini file::
621 into [app:main] section of your .ini file::
622
622
623 filter-with = proxy-prefix
623 filter-with = proxy-prefix
624
624
625 Add the following at the end of the .ini file::
625 Add the following at the end of the .ini file::
626
626
627 [filter:proxy-prefix]
627 [filter:proxy-prefix]
628 use = egg:PasteDeploy#prefix
628 use = egg:PasteDeploy#prefix
629 prefix = /<someprefix>
629 prefix = /<someprefix>
630
630
631
631
632 then change <someprefix> into your choosen prefix
632 then change <someprefix> into your choosen prefix
633
633
634 Apache's WSGI config
634 Apache's WSGI config
635 --------------------
635 --------------------
636
636
637 Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
637 Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
638 that, you'll need to:
638 that, you'll need to:
639
639
640 - Install mod_wsgi. If using a Debian-based distro, you can install
640 - Install mod_wsgi. If using a Debian-based distro, you can install
641 the package libapache2-mod-wsgi::
641 the package libapache2-mod-wsgi::
642
642
643 aptitude install libapache2-mod-wsgi
643 aptitude install libapache2-mod-wsgi
644
644
645 - Enable mod_wsgi::
645 - Enable mod_wsgi::
646
646
647 a2enmod wsgi
647 a2enmod wsgi
648
648
649 - Create a wsgi dispatch script, like the one below. Make sure you
649 - Create a wsgi dispatch script, like the one below. Make sure you
650 check the paths correctly point to where you installed RhodeCode
650 check the paths correctly point to where you installed RhodeCode
651 and its Python Virtual Environment.
651 and its Python Virtual Environment.
652 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
652 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
653 as in the following example. Once again, check the paths are
653 as in the following example. Once again, check the paths are
654 correctly specified.
654 correctly specified.
655
655
656 Here is a sample excerpt from an Apache Virtual Host configuration file::
656 Here is a sample excerpt from an Apache Virtual Host configuration file::
657
657
658 WSGIDaemonProcess pylons user=www-data group=www-data processes=1 \
658 WSGIDaemonProcess pylons user=www-data group=www-data processes=1 \
659 threads=4 \
659 threads=4 \
660 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
660 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
661 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
661 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
662 WSGIPassAuthorization On
662 WSGIPassAuthorization On
663
663
664 Example wsgi dispatch script::
664 Example wsgi dispatch script::
665
665
666 import os
666 import os
667 os.environ["HGENCODING"] = "UTF-8"
667 os.environ["HGENCODING"] = "UTF-8"
668 os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
668 os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
669
669
670 # sometimes it's needed to set the curent dir
670 # sometimes it's needed to set the curent dir
671 os.chdir('/home/web/rhodecode/')
671 os.chdir('/home/web/rhodecode/')
672
672
673 import site
673 import site
674 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
674 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
675
675
676 from paste.deploy import loadapp
676 from paste.deploy import loadapp
677 from paste.script.util.logging_config import fileConfig
677 from paste.script.util.logging_config import fileConfig
678
678
679 fileConfig('/home/web/rhodecode/production.ini')
679 fileConfig('/home/web/rhodecode/production.ini')
680 application = loadapp('config:/home/web/rhodecode/production.ini')
680 application = loadapp('config:/home/web/rhodecode/production.ini')
681
681
682 Note: when using mod_wsgi you'll need to install the same version of
682 Note: when using mod_wsgi you'll need to install the same version of
683 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
683 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
684 environment.
684 environment.
685
685
686
686
687 Other configuration files
687 Other configuration files
688 -------------------------
688 -------------------------
689
689
690 Some example init.d scripts can be found here, for debian and gentoo:
690 Some example init.d scripts can be found in init.d directory::
691
692 https://rhodecode.org/rhodecode/files/tip/init.d
693
694
695 Troubleshooting
696 ---------------
697
698 :Q: **Missing static files?**
699 :A: Make sure either to set the `static_files = true` in the .ini file or
700 double check the root path for your http setup. It should point to
701 for example:
702 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
703
704 |
705
706 :Q: **Can't install celery/rabbitmq**
707 :A: Don't worry RhodeCode works without them too. No extra setup is required.
708
691
709 |
692 https://secure.rhodecode.org/rhodecode/files/beta/init.d
710
711 :Q: **Long lasting push timeouts?**
712 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
713 are caused by https server and not RhodeCode.
714
715 |
716
717 :Q: **Large pushes timeouts?**
718 :A: Make sure you set a proper max_body_size for the http server.
719
720 |
721
722 :Q: **Apache doesn't pass basicAuth on pull/push?**
723 :A: Make sure you added `WSGIPassAuthorization true`.
724
725 For further questions search the `Issues tracker`_, or post a message in the
726 `google group rhodecode`_
727
693
728 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
694 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
729 .. _python: http://www.python.org/
695 .. _python: http://www.python.org/
730 .. _mercurial: http://mercurial.selenic.com/
696 .. _mercurial: http://mercurial.selenic.com/
731 .. _celery: http://celeryproject.org/
697 .. _celery: http://celeryproject.org/
732 .. _rabbitmq: http://www.rabbitmq.com/
698 .. _rabbitmq: http://www.rabbitmq.com/
733 .. _python-ldap: http://www.python-ldap.org/
699 .. _python-ldap: http://www.python-ldap.org/
734 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
700 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
735 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
701 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
736 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
702 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
737 .. _google group rhodecode: http://groups.google.com/group/rhodecode
703 .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now