##// END OF EJS Templates
Added request header downgrade for COPY command to work on https setup. Fixes #4307
marcink -
r1109:3aef7260 default
parent child Browse files
Show More
@@ -1,430 +1,432 b''
1 .. _vcs-server:
1 .. _vcs-server:
2
2
3 VCS Server Management
3 VCS Server Management
4 ---------------------
4 ---------------------
5
5
6 The VCS Server handles |RCM| backend functionality. You need to configure
6 The VCS Server handles |RCM| backend functionality. You need to configure
7 a VCS Server to run with a |RCM| instance. If you do not, you will be missing
7 a VCS Server to run with a |RCM| instance. If you do not, you will be missing
8 the connection between |RCM| and its |repos|. This will cause error messages
8 the connection between |RCM| and its |repos|. This will cause error messages
9 on the web interface. You can run your setup in the following configurations,
9 on the web interface. You can run your setup in the following configurations,
10 currently the best performance is one VCS Server per |RCM| instance:
10 currently the best performance is one VCS Server per |RCM| instance:
11
11
12 * One VCS Server per |RCM| instance.
12 * One VCS Server per |RCM| instance.
13 * One VCS Server handling multiple instances.
13 * One VCS Server handling multiple instances.
14
14
15 .. important::
15 .. important::
16
16
17 If your server locale settings are not correctly configured,
17 If your server locale settings are not correctly configured,
18 |RCE| and the VCS Server can run into issues. See this `Ask Ubuntu`_ post
18 |RCE| and the VCS Server can run into issues. See this `Ask Ubuntu`_ post
19 which explains the problem and gives a solution.
19 which explains the problem and gives a solution.
20
20
21 For more information, see the following sections:
21 For more information, see the following sections:
22
22
23 * :ref:`install-vcs`
23 * :ref:`install-vcs`
24 * :ref:`config-vcs`
24 * :ref:`config-vcs`
25 * :ref:`vcs-server-options`
25 * :ref:`vcs-server-options`
26 * :ref:`vcs-server-versions`
26 * :ref:`vcs-server-versions`
27 * :ref:`vcs-server-maintain`
27 * :ref:`vcs-server-maintain`
28 * :ref:`vcs-server-config-file`
28 * :ref:`vcs-server-config-file`
29 * :ref:`svn-http`
29 * :ref:`svn-http`
30
30
31 .. _install-vcs:
31 .. _install-vcs:
32
32
33 VCS Server Installation
33 VCS Server Installation
34 ^^^^^^^^^^^^^^^^^^^^^^^
34 ^^^^^^^^^^^^^^^^^^^^^^^
35
35
36 To install a VCS Server, see
36 To install a VCS Server, see
37 :ref:`Installing a VCS server <control:install-vcsserver>`.
37 :ref:`Installing a VCS server <control:install-vcsserver>`.
38
38
39 .. _config-vcs:
39 .. _config-vcs:
40
40
41 Hooking |RCE| to its VCS Server
41 Hooking |RCE| to its VCS Server
42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
43
44 To configure a |RCE| instance to use a VCS server, see
44 To configure a |RCE| instance to use a VCS server, see
45 :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`.
45 :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`.
46
46
47 .. _vcs-server-options:
47 .. _vcs-server-options:
48
48
49 |RCE| VCS Server Options
49 |RCE| VCS Server Options
50 ^^^^^^^^^^^^^^^^^^^^^^^^
50 ^^^^^^^^^^^^^^^^^^^^^^^^
51
51
52 The following list shows the available options on the |RCM| side of the
52 The following list shows the available options on the |RCM| side of the
53 connection to the VCS Server. The settings are configured per
53 connection to the VCS Server. The settings are configured per
54 instance in the
54 instance in the
55 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
55 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
56
56
57 .. rst-class:: dl-horizontal
57 .. rst-class:: dl-horizontal
58
58
59 \vcs.backends <available-vcs-systems>
59 \vcs.backends <available-vcs-systems>
60 Set a comma-separated list of the |repo| options available from the
60 Set a comma-separated list of the |repo| options available from the
61 web interface. The default is ``hg, git, svn``,
61 web interface. The default is ``hg, git, svn``,
62 which is all |repo| types available.
62 which is all |repo| types available.
63
63
64 \vcs.connection_timeout <seconds>
64 \vcs.connection_timeout <seconds>
65 Set the length of time in seconds that the VCS Server waits for
65 Set the length of time in seconds that the VCS Server waits for
66 requests to process. After the timeout expires,
66 requests to process. After the timeout expires,
67 the request is closed. The default is ``3600``. Set to a higher
67 the request is closed. The default is ``3600``. Set to a higher
68 number if you experience network latency, or timeout issues with very
68 number if you experience network latency, or timeout issues with very
69 large push/pull requests.
69 large push/pull requests.
70
70
71 \vcs.server.enable <boolean>
71 \vcs.server.enable <boolean>
72 Enable or disable the VCS Server. The available options are ``true`` or
72 Enable or disable the VCS Server. The available options are ``true`` or
73 ``false``. The default is ``true``.
73 ``false``. The default is ``true``.
74
74
75 \vcs.server <host:port>
75 \vcs.server <host:port>
76 Set the host, either hostname or IP Address, and port of the VCS server
76 Set the host, either hostname or IP Address, and port of the VCS server
77 you wish to run with your |RCM| instance.
77 you wish to run with your |RCM| instance.
78
78
79 .. code-block:: ini
79 .. code-block:: ini
80
80
81 ##################
81 ##################
82 ### VCS CONFIG ###
82 ### VCS CONFIG ###
83 ##################
83 ##################
84 # set this line to match your VCS Server
84 # set this line to match your VCS Server
85 vcs.server = 127.0.0.1:10004
85 vcs.server = 127.0.0.1:10004
86 # Set to False to disable the VCS Server
86 # Set to False to disable the VCS Server
87 vcs.server.enable = True
87 vcs.server.enable = True
88 vcs.backends = hg, git, svn
88 vcs.backends = hg, git, svn
89 vcs.connection_timeout = 3600
89 vcs.connection_timeout = 3600
90
90
91
91
92 .. _vcs-server-versions:
92 .. _vcs-server-versions:
93
93
94 VCS Server Versions
94 VCS Server Versions
95 ^^^^^^^^^^^^^^^^^^^
95 ^^^^^^^^^^^^^^^^^^^
96
96
97 An updated version of the VCS Server is released with each |RCE| version. Use
97 An updated version of the VCS Server is released with each |RCE| version. Use
98 the VCS Server number that matches with the |RCE| version to pair the
98 the VCS Server number that matches with the |RCE| version to pair the
99 appropriate ones together. For |RCE| versions pre 3.3.0,
99 appropriate ones together. For |RCE| versions pre 3.3.0,
100 VCS Server 1.X.Y works with |RCE| 3.X.Y, for example:
100 VCS Server 1.X.Y works with |RCE| 3.X.Y, for example:
101
101
102 * VCS Server 1.0.0 works with |RCE| 3.0.0
102 * VCS Server 1.0.0 works with |RCE| 3.0.0
103 * VCS Server 1.2.2 works with |RCE| 3.2.2
103 * VCS Server 1.2.2 works with |RCE| 3.2.2
104
104
105 For |RCE| versions post 3.3.0, the VCS Server and |RCE| version numbers
105 For |RCE| versions post 3.3.0, the VCS Server and |RCE| version numbers
106 match, for example:
106 match, for example:
107
107
108 * VCS Server |release| works with |RCE| |release|
108 * VCS Server |release| works with |RCE| |release|
109
109
110 .. _vcs-server-maintain:
110 .. _vcs-server-maintain:
111
111
112 VCS Server Memory Optimization
112 VCS Server Memory Optimization
113 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
114
115 To configure the VCS server to manage the cache efficiently, you need to
115 To configure the VCS server to manage the cache efficiently, you need to
116 configure the following options in the
116 configure the following options in the
117 :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once
117 :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once
118 configured, restart the VCS Server.
118 configured, restart the VCS Server.
119
119
120 .. rst-class:: dl-horizontal
120 .. rst-class:: dl-horizontal
121
121
122 \beaker.cache.repo_object.type = memorylru
122 \beaker.cache.repo_object.type = memorylru
123 Configures the cache to discard the least recently used items.
123 Configures the cache to discard the least recently used items.
124 This setting takes the following valid options:
124 This setting takes the following valid options:
125
125
126 * ``memorylru``: The default setting, which removes the least recently
126 * ``memorylru``: The default setting, which removes the least recently
127 used items from the cache.
127 used items from the cache.
128 * ``memory``: Runs the VCS Server without clearing the cache.
128 * ``memory``: Runs the VCS Server without clearing the cache.
129 * ``nocache``: Runs the VCS Server without a cache. This will
129 * ``nocache``: Runs the VCS Server without a cache. This will
130 dramatically reduce the VCS Server performance.
130 dramatically reduce the VCS Server performance.
131
131
132 \beaker.cache.repo_object.max_items = 100
132 \beaker.cache.repo_object.max_items = 100
133 Sets the maximum number of items stored in the cache, before the cache
133 Sets the maximum number of items stored in the cache, before the cache
134 starts to be cleared.
134 starts to be cleared.
135
135
136 As a general rule of thumb, running this value at 120 resulted in a
136 As a general rule of thumb, running this value at 120 resulted in a
137 5GB cache. Running it at 240 resulted in a 9GB cache. Your results
137 5GB cache. Running it at 240 resulted in a 9GB cache. Your results
138 will differ based on usage patterns and |repo| sizes.
138 will differ based on usage patterns and |repo| sizes.
139
139
140 Tweaking this value to run at a fairly constant memory load on your
140 Tweaking this value to run at a fairly constant memory load on your
141 server will help performance.
141 server will help performance.
142
142
143 To clear the cache completely, you can restart the VCS Server.
143 To clear the cache completely, you can restart the VCS Server.
144
144
145 .. important::
145 .. important::
146
146
147 While the VCS Server handles a restart gracefully on the web interface,
147 While the VCS Server handles a restart gracefully on the web interface,
148 it will drop connections during push/pull requests. So it is recommended
148 it will drop connections during push/pull requests. So it is recommended
149 you only perform this when there is very little traffic on the instance.
149 you only perform this when there is very little traffic on the instance.
150
150
151 Use the following example to restart your VCS Server,
151 Use the following example to restart your VCS Server,
152 for full details see the :ref:`RhodeCode Control CLI <control:rcc-cli>`.
152 for full details see the :ref:`RhodeCode Control CLI <control:rcc-cli>`.
153
153
154 .. code-block:: bash
154 .. code-block:: bash
155
155
156 $ rccontrol status
156 $ rccontrol status
157
157
158 .. code-block:: vim
158 .. code-block:: vim
159
159
160 - NAME: vcsserver-1
160 - NAME: vcsserver-1
161 - STATUS: RUNNING
161 - STATUS: RUNNING
162 - TYPE: VCSServer
162 - TYPE: VCSServer
163 - VERSION: 1.0.0
163 - VERSION: 1.0.0
164 - URL: http://127.0.0.1:10001
164 - URL: http://127.0.0.1:10001
165
165
166 $ rccontrol restart vcsserver-1
166 $ rccontrol restart vcsserver-1
167 Instance "vcsserver-1" successfully stopped.
167 Instance "vcsserver-1" successfully stopped.
168 Instance "vcsserver-1" successfully started.
168 Instance "vcsserver-1" successfully started.
169
169
170 .. _vcs-server-config-file:
170 .. _vcs-server-config-file:
171
171
172 VCS Server Configuration
172 VCS Server Configuration
173 ^^^^^^^^^^^^^^^^^^^^^^^^
173 ^^^^^^^^^^^^^^^^^^^^^^^^
174
174
175 You can configure settings for multiple VCS Servers on your
175 You can configure settings for multiple VCS Servers on your
176 system using their individual configuration files. Use the following
176 system using their individual configuration files. Use the following
177 properties inside the configuration file to set up your system. The default
177 properties inside the configuration file to set up your system. The default
178 location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`.
178 location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`.
179 For a more detailed explanation of the logger levers, see :ref:`debug-mode`.
179 For a more detailed explanation of the logger levers, see :ref:`debug-mode`.
180
180
181 .. rst-class:: dl-horizontal
181 .. rst-class:: dl-horizontal
182
182
183 \host <ip-address>
183 \host <ip-address>
184 Set the host on which the VCS Server will run.
184 Set the host on which the VCS Server will run.
185
185
186 \port <int>
186 \port <int>
187 Set the port number on which the VCS Server will be available.
187 Set the port number on which the VCS Server will be available.
188
188
189 \locale <locale_utf>
189 \locale <locale_utf>
190 Set the locale the VCS Server expects.
190 Set the locale the VCS Server expects.
191
191
192 \threadpool_size <int>
192 \threadpool_size <int>
193 Set the size of the threadpool used to communicate
193 Set the size of the threadpool used to communicate
194 with the WSGI workers. This should be at least 6 times the number of
194 with the WSGI workers. This should be at least 6 times the number of
195 WSGI worker processes.
195 WSGI worker processes.
196
196
197 \timeout <seconds>
197 \timeout <seconds>
198 Set the timeout for RPC communication in seconds.
198 Set the timeout for RPC communication in seconds.
199
199
200 .. note::
200 .. note::
201
201
202 After making changes, you need to restart your VCS Server to pick them up.
202 After making changes, you need to restart your VCS Server to pick them up.
203
203
204 .. code-block:: ini
204 .. code-block:: ini
205
205
206 ################################################################################
206 ################################################################################
207 # RhodeCode VCSServer - configuration #
207 # RhodeCode VCSServer - configuration #
208 # #
208 # #
209 ################################################################################
209 ################################################################################
210
210
211 [DEFAULT]
211 [DEFAULT]
212 host = 127.0.0.1
212 host = 127.0.0.1
213 port = 9900
213 port = 9900
214 locale = en_US.UTF-8
214 locale = en_US.UTF-8
215 # number of worker threads, this should be set based on a formula threadpool=N*6
215 # number of worker threads, this should be set based on a formula threadpool=N*6
216 # where N is number of RhodeCode Enterprise workers, eg. running 2 instances
216 # where N is number of RhodeCode Enterprise workers, eg. running 2 instances
217 # 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96
217 # 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96
218 threadpool_size = 16
218 threadpool_size = 16
219 timeout = 0
219 timeout = 0
220
220
221 # cache regions, please don't change
221 # cache regions, please don't change
222 beaker.cache.regions = repo_object
222 beaker.cache.regions = repo_object
223 beaker.cache.repo_object.type = memorylru
223 beaker.cache.repo_object.type = memorylru
224 beaker.cache.repo_object.max_items = 1000
224 beaker.cache.repo_object.max_items = 1000
225
225
226 # cache auto-expires after N seconds
226 # cache auto-expires after N seconds
227 beaker.cache.repo_object.expire = 10
227 beaker.cache.repo_object.expire = 10
228 beaker.cache.repo_object.enabled = true
228 beaker.cache.repo_object.enabled = true
229
229
230
230
231 ################################
231 ################################
232 ### LOGGING CONFIGURATION ####
232 ### LOGGING CONFIGURATION ####
233 ################################
233 ################################
234 [loggers]
234 [loggers]
235 keys = root, vcsserver, pyro4, beaker
235 keys = root, vcsserver, pyro4, beaker
236
236
237 [handlers]
237 [handlers]
238 keys = console
238 keys = console
239
239
240 [formatters]
240 [formatters]
241 keys = generic
241 keys = generic
242
242
243 #############
243 #############
244 ## LOGGERS ##
244 ## LOGGERS ##
245 #############
245 #############
246 [logger_root]
246 [logger_root]
247 level = NOTSET
247 level = NOTSET
248 handlers = console
248 handlers = console
249
249
250 [logger_vcsserver]
250 [logger_vcsserver]
251 level = DEBUG
251 level = DEBUG
252 handlers =
252 handlers =
253 qualname = vcsserver
253 qualname = vcsserver
254 propagate = 1
254 propagate = 1
255
255
256 [logger_beaker]
256 [logger_beaker]
257 level = DEBUG
257 level = DEBUG
258 handlers =
258 handlers =
259 qualname = beaker
259 qualname = beaker
260 propagate = 1
260 propagate = 1
261
261
262 [logger_pyro4]
262 [logger_pyro4]
263 level = DEBUG
263 level = DEBUG
264 handlers =
264 handlers =
265 qualname = Pyro4
265 qualname = Pyro4
266 propagate = 1
266 propagate = 1
267
267
268
268
269 ##############
269 ##############
270 ## HANDLERS ##
270 ## HANDLERS ##
271 ##############
271 ##############
272
272
273 [handler_console]
273 [handler_console]
274 class = StreamHandler
274 class = StreamHandler
275 args = (sys.stderr,)
275 args = (sys.stderr,)
276 level = DEBUG
276 level = DEBUG
277 formatter = generic
277 formatter = generic
278
278
279 [handler_file]
279 [handler_file]
280 class = FileHandler
280 class = FileHandler
281 args = ('vcsserver.log', 'a',)
281 args = ('vcsserver.log', 'a',)
282 level = DEBUG
282 level = DEBUG
283 formatter = generic
283 formatter = generic
284
284
285 [handler_file_rotating]
285 [handler_file_rotating]
286 class = logging.handlers.TimedRotatingFileHandler
286 class = logging.handlers.TimedRotatingFileHandler
287 # 'D', 5 - rotate every 5days
287 # 'D', 5 - rotate every 5days
288 # you can set 'h', 'midnight'
288 # you can set 'h', 'midnight'
289 args = ('vcsserver.log', 'D', 5, 10,)
289 args = ('vcsserver.log', 'D', 5, 10,)
290 level = DEBUG
290 level = DEBUG
291 formatter = generic
291 formatter = generic
292
292
293 ################
293 ################
294 ## FORMATTERS ##
294 ## FORMATTERS ##
295 ################
295 ################
296
296
297 [formatter_generic]
297 [formatter_generic]
298 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
298 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
299 datefmt = %Y-%m-%d %H:%M:%S
299 datefmt = %Y-%m-%d %H:%M:%S
300
300
301 .. _svn-http:
301 .. _svn-http:
302
302
303 |svn| With Write Over HTTP
303 |svn| With Write Over HTTP
304 ^^^^^^^^^^^^^^^^^^^^^^^^^^
304 ^^^^^^^^^^^^^^^^^^^^^^^^^^
305
305
306 To use |svn| with read/write support over the |svn| HTTP protocol, you have to
306 To use |svn| with read/write support over the |svn| HTTP protocol, you have to
307 configure the HTTP |svn| backend.
307 configure the HTTP |svn| backend.
308
308
309 Prerequisites
309 Prerequisites
310 =============
310 =============
311
311
312 - Enable HTTP support inside the admin VCS settings on your |RCE| instance
312 - Enable HTTP support inside the admin VCS settings on your |RCE| instance
313 - You need to install the following tools on the machine that is running an
313 - You need to install the following tools on the machine that is running an
314 instance of |RCE|:
314 instance of |RCE|:
315 ``Apache HTTP Server`` and
315 ``Apache HTTP Server`` and
316 ``mod_dav_svn``.
316 ``mod_dav_svn``.
317
317
318
318
319 Using Ubuntu Distribution as an example you can run:
319 Using Ubuntu Distribution as an example you can run:
320
320
321 .. code-block:: bash
321 .. code-block:: bash
322
322
323 $ sudo apt-get install apache2 libapache2-mod-svn
323 $ sudo apt-get install apache2 libapache2-mod-svn
324
324
325 Once installed you need to enable ``dav_svn``:
325 Once installed you need to enable ``dav_svn``:
326
326
327 .. code-block:: bash
327 .. code-block:: bash
328
328
329 $ sudo a2enmod dav_svn
329 $ sudo a2enmod dav_svn
330 $ sudo a2enmod headers
331
330
332
331 Configuring Apache Setup
333 Configuring Apache Setup
332 ========================
334 ========================
333
335
334 .. tip::
336 .. tip::
335
337
336 It is recommended to run Apache on a port other than 80, due to possible
338 It is recommended to run Apache on a port other than 80, due to possible
337 conflicts with other HTTP servers like nginx. To do this, set the
339 conflicts with other HTTP servers like nginx. To do this, set the
338 ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
340 ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
339 ``Listen 8090``.
341 ``Listen 8090``.
340
342
341
343
342 .. warning::
344 .. warning::
343
345
344 Make sure your Apache instance which runs the mod_dav_svn module is
346 Make sure your Apache instance which runs the mod_dav_svn module is
345 only accessible by RhodeCode. Otherwise everyone is able to browse
347 only accessible by RhodeCode. Otherwise everyone is able to browse
346 the repositories or run subversion operations (checkout/commit/etc.).
348 the repositories or run subversion operations (checkout/commit/etc.).
347
349
348 It is also recommended to run apache as the same user as |RCE|, otherwise
350 It is also recommended to run apache as the same user as |RCE|, otherwise
349 permission issues could occur. To do this edit the ``/etc/apache2/envvars``
351 permission issues could occur. To do this edit the ``/etc/apache2/envvars``
350
352
351 .. code-block:: apache
353 .. code-block:: apache
352
354
353 export APACHE_RUN_USER=rhodecode
355 export APACHE_RUN_USER=rhodecode
354 export APACHE_RUN_GROUP=rhodecode
356 export APACHE_RUN_GROUP=rhodecode
355
357
356 1. To configure Apache, create and edit a virtual hosts file, for example
358 1. To configure Apache, create and edit a virtual hosts file, for example
357 :file:`/etc/apache2/sites-available/default.conf`. Below is an example
359 :file:`/etc/apache2/sites-available/default.conf`. Below is an example
358 how to use one with auto-generated config ```mod_dav_svn.conf```
360 how to use one with auto-generated config ```mod_dav_svn.conf```
359 from configured |RCE| instance.
361 from configured |RCE| instance.
360
362
361 .. code-block:: apache
363 .. code-block:: apache
362
364
363 <VirtualHost *:8080>
365 <VirtualHost *:8080>
364 ServerAdmin rhodecode-admin@localhost
366 ServerAdmin rhodecode-admin@localhost
365 DocumentRoot /var/www/html
367 DocumentRoot /var/www/html
366 ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
368 ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
367 CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
369 CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
368 Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
370 Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
369 </VirtualHost>
371 </VirtualHost>
370
372
371
373
372 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and
374 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and
373 enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
375 enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
374 :guilabel:`Subversion HTTP Server URL`.
376 :guilabel:`Subversion HTTP Server URL`.
375
377
376 3. Open the |RCE| configuration file,
378 3. Open the |RCE| configuration file,
377 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
379 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
378
380
379 4. Add the following configuration option in the ``[app:main]``
381 4. Add the following configuration option in the ``[app:main]``
380 section if you don't have it yet.
382 section if you don't have it yet.
381
383
382 This enables mapping of the created |RCE| repo groups into special |svn| paths.
384 This enables mapping of the created |RCE| repo groups into special |svn| paths.
383 Each time a new repository group is created, the system will update
385 Each time a new repository group is created, the system will update
384 the template file and create new mapping. Apache web server needs to be
386 the template file and create new mapping. Apache web server needs to be
385 reloaded to pick up the changes on this file.
387 reloaded to pick up the changes on this file.
386 It's recommended to add reload into a crontab so the changes can be picked
388 It's recommended to add reload into a crontab so the changes can be picked
387 automatically once someone creates a repository group inside RhodeCode.
389 automatically once someone creates a repository group inside RhodeCode.
388
390
389
391
390 .. code-block:: ini
392 .. code-block:: ini
391
393
392 ##############################################
394 ##############################################
393 ### Subversion proxy support (mod_dav_svn) ###
395 ### Subversion proxy support (mod_dav_svn) ###
394 ##############################################
396 ##############################################
395 ## Enable or disable the config file generation.
397 ## Enable or disable the config file generation.
396 svn.proxy.generate_config = true
398 svn.proxy.generate_config = true
397 ## Generate config file with `SVNListParentPath` set to `On`.
399 ## Generate config file with `SVNListParentPath` set to `On`.
398 svn.proxy.list_parent_path = true
400 svn.proxy.list_parent_path = true
399 ## Set location and file name of generated config file.
401 ## Set location and file name of generated config file.
400 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
402 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
401 ## File system path to the directory containing the repositories served by
403 ## File system path to the directory containing the repositories served by
402 ## RhodeCode.
404 ## RhodeCode.
403 svn.proxy.parent_path_root = /path/to/repo_store
405 svn.proxy.parent_path_root = /path/to/repo_store
404 ## Used as a prefix to the <Location> block in the generated config file. In
406 ## Used as a prefix to the <Location> block in the generated config file. In
405 ## most cases it should be set to `/`.
407 ## most cases it should be set to `/`.
406 svn.proxy.location_root = /
408 svn.proxy.location_root = /
407
409
408
410
409 This would create a special template file called ```mod_dav_svn.conf```. We
411 This would create a special template file called ```mod_dav_svn.conf```. We
410 used that file path in the apache config above inside the Include statement.
412 used that file path in the apache config above inside the Include statement.
411
413
412
414
413 Using |svn|
415 Using |svn|
414 ===========
416 ===========
415
417
416 Once |svn| has been enabled on your instance, you can use it with the
418 Once |svn| has been enabled on your instance, you can use it with the
417 following examples. For more |svn| information, see the `Subversion Red Book`_
419 following examples. For more |svn| information, see the `Subversion Red Book`_
418
420
419 .. code-block:: bash
421 .. code-block:: bash
420
422
421 # To clone a repository
423 # To clone a repository
422 svn checkout http://my-svn-server.example.com/my-svn-repo
424 svn checkout http://my-svn-server.example.com/my-svn-repo
423
425
424 # svn commit
426 # svn commit
425 svn commit
427 svn commit
426
428
427 .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
429 .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
428
430
429
431
430 .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file
432 .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
@@ -1,76 +1,79 b''
1 # Auto generated configuration for use with the Apache mod_dav_svn module.
1 # Auto generated configuration for use with the Apache mod_dav_svn module.
2 #
2 #
3 # WARNING: Make sure your Apache instance which runs the mod_dav_svn module is
3 # WARNING: Make sure your Apache instance which runs the mod_dav_svn module is
4 # only accessible by RhodeCode. Otherwise everyone is able to browse
4 # only accessible by RhodeCode. Otherwise everyone is able to browse
5 # the repositories or run subversion operations (checkout/commit/etc.).
5 # the repositories or run subversion operations (checkout/commit/etc.).
6 #
6 #
7 # The mod_dav_svn module does not support subversion repositories which are
7 # The mod_dav_svn module does not support subversion repositories which are
8 # organized in subfolders. To support the repository groups of RhodeCode it is
8 # organized in subfolders. To support the repository groups of RhodeCode it is
9 # required to provide a <Location> block for each group pointing to the
9 # required to provide a <Location> block for each group pointing to the
10 # repository group sub folder. To ease the configuration RhodeCode auto
10 # repository group sub folder. To ease the configuration RhodeCode auto
11 # generates this file whenever a repository group is created/changed/deleted.
11 # generates this file whenever a repository group is created/changed/deleted.
12 # Auto generation can be configured in the ini file. Settings are prefixed with
12 # Auto generation can be configured in the ini file. Settings are prefixed with
13 # ``svn.proxy``.
13 # ``svn.proxy``.
14 #
14 #
15 # To include this configuration into your apache config you can use the
15 # To include this configuration into your apache config you can use the
16 # `Include` directive. See the following example snippet of a virtual host how
16 # `Include` directive. See the following example snippet of a virtual host how
17 # to include this configuration file.
17 # to include this configuration file.
18 #
18 #
19 # <VirtualHost *:8080>
19 # <VirtualHost *:8080>
20 # ServerAdmin webmaster@localhost
20 # ServerAdmin webmaster@localhost
21 # DocumentRoot /var/www/html
21 # DocumentRoot /var/www/html
22 # ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
22 # ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
23 # CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
23 # CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
24 # Include /path/to/generated/mod_dav_svn.conf
24 # Include /path/to/generated/mod_dav_svn.conf
25 # </VirtualHost>
25 # </VirtualHost>
26 #
26 #
27 # Depending on the apache configuration you may encounter the following error if
27 # Depending on the apache configuration you may encounter the following error if
28 # you are using speecial characters in your repository or repository group
28 # you are using speecial characters in your repository or repository group
29 # names.
29 # names.
30 #
30 #
31 # ``Error converting entry in directory '/path/to/repo' to UTF-8``
31 # ``Error converting entry in directory '/path/to/repo' to UTF-8``
32 #
32 #
33 # In this case you have to change the LANG environment variable in the apache
33 # In this case you have to change the LANG environment variable in the apache
34 # configuration. This setting is typically located at ``/etc/apache2/envvars``.
34 # configuration. This setting is typically located at ``/etc/apache2/envvars``.
35 # You have to change it to an UTF-8 value like ``export LANG="en_US.UTF-8"``.
35 # You have to change it to an UTF-8 value like ``export LANG="en_US.UTF-8"``.
36 # After changing this a stop and start of Apache is required (using restart
36 # After changing this a stop and start of Apache is required (using restart
37 # doesn't work).
37 # doesn't work).
38
38
39 # fix https -> http downgrade with DAV. It requires an header downgrade for
40 # https -> http reverse proxy to work properly
41 RequestHeader edit Destination ^https: http: early
39
42
40 <Location "${location_root|n}">
43 <Location "${location_root|n}">
41 # The mod_dav_svn module takes the username from the apache request object.
44 # The mod_dav_svn module takes the username from the apache request object.
42 # Without authorization this will be empty and no username is logged for the
45 # Without authorization this will be empty and no username is logged for the
43 # transactions. This will result in "(no author)" for each revision. The
46 # transactions. This will result in "(no author)" for each revision. The
44 # following directives implement a fake authentication that allows every
47 # following directives implement a fake authentication that allows every
45 # username/password combination.
48 # username/password combination.
46 AuthType Basic
49 AuthType Basic
47 AuthName "${rhodecode_realm|n}"
50 AuthName "${rhodecode_realm|n}"
48 AuthBasicProvider anon
51 AuthBasicProvider anon
49 Anonymous *
52 Anonymous *
50 Require valid-user
53 Require valid-user
51
54
52 DAV svn
55 DAV svn
53 SVNParentPath "${parent_path_root|n}"
56 SVNParentPath "${parent_path_root|n}"
54 SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n}
57 SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n}
55
58
56 Allow from all
59 Allow from all
57 Order allow,deny
60 Order allow,deny
58 </Location>
61 </Location>
59
62
60 % for location, parent_path in repo_group_paths:
63 % for location, parent_path in repo_group_paths:
61
64
62 <Location "${location|n}">
65 <Location "${location|n}">
63 AuthType Basic
66 AuthType Basic
64 AuthName "${rhodecode_realm|n}"
67 AuthName "${rhodecode_realm|n}"
65 AuthBasicProvider anon
68 AuthBasicProvider anon
66 Anonymous *
69 Anonymous *
67 Require valid-user
70 Require valid-user
68
71
69 DAV svn
72 DAV svn
70 SVNParentPath "${parent_path|n}"
73 SVNParentPath "${parent_path|n}"
71 SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n}
74 SVNListParentPath ${"On" if svn_list_parent_path else "Off"|n}
72
75
73 Allow from all
76 Allow from all
74 Order allow,deny
77 Order allow,deny
75 </Location>
78 </Location>
76 % endfor
79 % endfor
General Comments 0
You need to be logged in to leave comments. Login now