Show More
@@ -0,0 +1,137 b'' | |||
|
1 | .. _svn-http: | |
|
2 | ||
|
3 | |svn| With Write Over HTTP | |
|
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
|
5 | ||
|
6 | To use |svn| with read/write support over the |svn| HTTP protocol, you have to | |
|
7 | configure the HTTP |svn| backend. | |
|
8 | ||
|
9 | Prerequisites | |
|
10 | ============= | |
|
11 | ||
|
12 | - Enable HTTP support inside the admin VCS settings on your |RCE| instance | |
|
13 | - You need to install the following tools on the machine that is running an | |
|
14 | instance of |RCE|: | |
|
15 | ``Apache HTTP Server`` and ``mod_dav_svn``. | |
|
16 | ||
|
17 | ||
|
18 | Using Ubuntu 14.04 Distribution as an example execute the following: | |
|
19 | ||
|
20 | .. code-block:: bash | |
|
21 | ||
|
22 | $ sudo apt-get install apache2 libapache2-mod-svn | |
|
23 | ||
|
24 | Once installed you need to enable ``dav_svn``: | |
|
25 | ||
|
26 | .. code-block:: bash | |
|
27 | ||
|
28 | $ sudo a2enmod dav_svn | |
|
29 | $ sudo a2enmod headers | |
|
30 | ||
|
31 | ||
|
32 | Configuring Apache Setup | |
|
33 | ======================== | |
|
34 | ||
|
35 | .. tip:: | |
|
36 | ||
|
37 | It is recommended to run Apache on a port other than 80, due to possible | |
|
38 | conflicts with other HTTP servers like nginx. To do this, set the | |
|
39 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example | |
|
40 | ``Listen 8090``. | |
|
41 | ||
|
42 | ||
|
43 | .. warning:: | |
|
44 | ||
|
45 | Make sure your Apache instance which runs the mod_dav_svn module is | |
|
46 | only accessible by |RCE|. Otherwise everyone is able to browse | |
|
47 | the repositories or run subversion operations (checkout/commit/etc.). | |
|
48 | ||
|
49 | It is also recommended to run apache as the same user as |RCE|, otherwise | |
|
50 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` | |
|
51 | ||
|
52 | .. code-block:: apache | |
|
53 | ||
|
54 | export APACHE_RUN_USER=rhodecode | |
|
55 | export APACHE_RUN_GROUP=rhodecode | |
|
56 | ||
|
57 | 1. To configure Apache, create and edit a virtual hosts file, for example | |
|
58 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example | |
|
59 | how to use one with auto-generated config ```mod_dav_svn.conf``` | |
|
60 | from configured |RCE| instance. | |
|
61 | ||
|
62 | .. code-block:: apache | |
|
63 | ||
|
64 | <VirtualHost *:8090> | |
|
65 | ServerAdmin rhodecode-admin@localhost | |
|
66 | DocumentRoot /var/www/html | |
|
67 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |
|
68 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |
|
69 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf | |
|
70 | </VirtualHost> | |
|
71 | ||
|
72 | ||
|
73 | 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and | |
|
74 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the | |
|
75 | :guilabel:`Subversion HTTP Server URL`. | |
|
76 | ||
|
77 | 3. Open the |RCE| configuration file, | |
|
78 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
|
79 | ||
|
80 | 4. Add the following configuration option in the ``[app:main]`` | |
|
81 | section if you don't have it yet. | |
|
82 | ||
|
83 | This enables mapping of the created |RCE| repo groups into special | |
|
84 | |svn| paths. Each time a new repository group is created, the system will | |
|
85 | update the template file and create new mapping. Apache web server needs to | |
|
86 | be reloaded to pick up the changes on this file. | |
|
87 | To do this, simply configure `svn.proxy.reload_cmd` inside the .ini file. | |
|
88 | Example configuration: | |
|
89 | ||
|
90 | ||
|
91 | .. code-block:: ini | |
|
92 | ||
|
93 | ############################################################ | |
|
94 | ### Subversion proxy support (mod_dav_svn) ### | |
|
95 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |
|
96 | ############################################################ | |
|
97 | ## Enable or disable the config file generation. | |
|
98 | svn.proxy.generate_config = true | |
|
99 | ## Generate config file with `SVNListParentPath` set to `On`. | |
|
100 | svn.proxy.list_parent_path = true | |
|
101 | ## Set location and file name of generated config file. | |
|
102 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
103 | ## Used as a prefix to the <Location> block in the generated config file. | |
|
104 | ## In most cases it should be set to `/`. | |
|
105 | svn.proxy.location_root = / | |
|
106 | ## Command to reload the mod dav svn configuration on change. | |
|
107 | ## Example: `/etc/init.d/apache2 reload` | |
|
108 | svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
|
109 | ## If the timeout expires before the reload command finishes, the command will | |
|
110 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |
|
111 | #svn.proxy.reload_timeout = 10 | |
|
112 | ||
|
113 | ||
|
114 | This would create a special template file called ```mod_dav_svn.conf```. We | |
|
115 | used that file path in the apache config above inside the Include statement. | |
|
116 | It's also possible to generate the config from the | |
|
117 | :menuselection:`Admin --> Settings --> VCS` page. | |
|
118 | ||
|
119 | ||
|
120 | Using |svn| | |
|
121 | =========== | |
|
122 | ||
|
123 | Once |svn| has been enabled on your instance, you can use it with the | |
|
124 | following examples. For more |svn| information, see the `Subversion Red Book`_ | |
|
125 | ||
|
126 | .. code-block:: bash | |
|
127 | ||
|
128 | # To clone a repository | |
|
129 | svn checkout http://my-svn-server.example.com/my-svn-repo | |
|
130 | ||
|
131 | # svn commit | |
|
132 | svn commit | |
|
133 | ||
|
134 | ||
|
135 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn | |
|
136 | ||
|
137 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file |
@@ -18,6 +18,7 b' The following are the most common system' | |||
|
18 | 18 | |
|
19 | 19 | config-files-overview |
|
20 | 20 | vcs-server |
|
21 | svn-http | |
|
21 | 22 | apache-config |
|
22 | 23 | nginx-config |
|
23 | 24 | backup-restore |
@@ -298,135 +298,7 b' For a more detailed explanation of the l' | |||
|
298 | 298 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
299 | 299 | datefmt = %Y-%m-%d %H:%M:%S |
|
300 | 300 | |
|
301 | .. _svn-http: | |
|
302 | ||
|
303 | |svn| With Write Over HTTP | |
|
304 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
|
305 | ||
|
306 | To use |svn| with read/write support over the |svn| HTTP protocol, you have to | |
|
307 | configure the HTTP |svn| backend. | |
|
308 | ||
|
309 | Prerequisites | |
|
310 | ============= | |
|
311 | ||
|
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 | |
|
314 | instance of |RCE|: | |
|
315 | ``Apache HTTP Server`` and | |
|
316 | ``mod_dav_svn``. | |
|
317 | ||
|
318 | ||
|
319 | Using Ubuntu Distribution as an example you can run: | |
|
320 | ||
|
321 | .. code-block:: bash | |
|
322 | ||
|
323 | $ sudo apt-get install apache2 libapache2-mod-svn | |
|
324 | ||
|
325 | Once installed you need to enable ``dav_svn``: | |
|
326 | ||
|
327 | .. code-block:: bash | |
|
328 | ||
|
329 | $ sudo a2enmod dav_svn | |
|
330 | $ sudo a2enmod headers | |
|
331 | ||
|
332 | ||
|
333 | Configuring Apache Setup | |
|
334 | ======================== | |
|
335 | ||
|
336 | .. tip:: | |
|
337 | ||
|
338 | It is recommended to run Apache on a port other than 80, due to possible | |
|
339 | conflicts with other HTTP servers like nginx. To do this, set the | |
|
340 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example | |
|
341 | ``Listen 8090``. | |
|
342 | ||
|
343 | ||
|
344 | .. warning:: | |
|
345 | ||
|
346 | Make sure your Apache instance which runs the mod_dav_svn module is | |
|
347 | only accessible by RhodeCode. Otherwise everyone is able to browse | |
|
348 | the repositories or run subversion operations (checkout/commit/etc.). | |
|
349 | ||
|
350 | It is also recommended to run apache as the same user as |RCE|, otherwise | |
|
351 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` | |
|
352 | ||
|
353 | .. code-block:: apache | |
|
354 | ||
|
355 | export APACHE_RUN_USER=rhodecode | |
|
356 | export APACHE_RUN_GROUP=rhodecode | |
|
357 | ||
|
358 | 1. To configure Apache, create and edit a virtual hosts file, for example | |
|
359 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example | |
|
360 | how to use one with auto-generated config ```mod_dav_svn.conf``` | |
|
361 | from configured |RCE| instance. | |
|
362 | ||
|
363 | .. code-block:: apache | |
|
364 | ||
|
365 | <VirtualHost *:8080> | |
|
366 | ServerAdmin rhodecode-admin@localhost | |
|
367 | DocumentRoot /var/www/html | |
|
368 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |
|
369 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |
|
370 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf | |
|
371 | </VirtualHost> | |
|
372 | ||
|
373 | ||
|
374 | 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and | |
|
375 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the | |
|
376 | :guilabel:`Subversion HTTP Server URL`. | |
|
377 | ||
|
378 | 3. Open the |RCE| configuration file, | |
|
379 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
|
380 | ||
|
381 | 4. Add the following configuration option in the ``[app:main]`` | |
|
382 | section if you don't have it yet. | |
|
383 | ||
|
384 | This enables mapping of the created |RCE| repo groups into special |svn| paths. | |
|
385 | Each time a new repository group is created, the system will update | |
|
386 | the template file and create new mapping. Apache web server needs to be | |
|
387 | reloaded to pick up the changes on this file. | |
|
388 | It's recommended to add reload into a crontab so the changes can be picked | |
|
389 | automatically once someone creates a repository group inside RhodeCode. | |
|
390 | ||
|
391 | ||
|
392 | .. code-block:: ini | |
|
393 | ||
|
394 | ############################################## | |
|
395 | ### Subversion proxy support (mod_dav_svn) ### | |
|
396 | ############################################## | |
|
397 | ## Enable or disable the config file generation. | |
|
398 | svn.proxy.generate_config = true | |
|
399 | ## Generate config file with `SVNListParentPath` set to `On`. | |
|
400 | svn.proxy.list_parent_path = true | |
|
401 | ## Set location and file name of generated config file. | |
|
402 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
403 | ## File system path to the directory containing the repositories served by | |
|
404 | ## RhodeCode. | |
|
405 | svn.proxy.parent_path_root = /path/to/repo_store | |
|
406 | ## Used as a prefix to the <Location> block in the generated config file. In | |
|
407 | ## most cases it should be set to `/`. | |
|
408 | svn.proxy.location_root = / | |
|
409 | ||
|
410 | ||
|
411 | This would create a special template file called ```mod_dav_svn.conf```. We | |
|
412 | used that file path in the apache config above inside the Include statement. | |
|
413 | ||
|
414 | ||
|
415 | Using |svn| | |
|
416 | =========== | |
|
417 | ||
|
418 | Once |svn| has been enabled on your instance, you can use it with the | |
|
419 | following examples. For more |svn| information, see the `Subversion Red Book`_ | |
|
420 | ||
|
421 | .. code-block:: bash | |
|
422 | ||
|
423 | # To clone a repository | |
|
424 | svn checkout http://my-svn-server.example.com/my-svn-repo | |
|
425 | ||
|
426 | # svn commit | |
|
427 | svn commit | |
|
428 | 301 | |
|
429 | 302 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn |
|
430 | 303 | |
|
431 | ||
|
432 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file | |
|
304 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue |
General Comments 0
You need to be logged in to leave comments.
Login now