Show More
@@ -3,16 +3,21 b'' | |||||
3 | |svn| With Write Over HTTP |
|
3 | |svn| With Write Over HTTP | |
4 | -------------------------- |
|
4 | -------------------------- | |
5 |
|
5 | |||
6 | To use |svn| with write access, the currently supported method is over HTTP. |
|
6 | To use |svn| with read/write support over the |svn| protocol, you have to | |
7 | This requires you to configure your local machine so that it can access your |
|
7 | configure HTTP |svn| backend. | |
8 | |RCE| instance. |
|
|||
9 |
|
8 | |||
10 | Prerequisites |
|
9 | Prerequisites | |
11 | ^^^^^^^^^^^^^ |
|
10 | ^^^^^^^^^^^^^ | |
12 |
|
11 | |||
13 |
- Enable lab setting on your |RCE| instance, |
|
12 | - Enable HTTP support inside labs setting on your |RCE| instance, | |
14 | - You need to install the following tools on your local machine: ``Apache`` and |
|
13 | see :ref:`lab-settings`. | |
15 | ``mod_dav_svn``. Use the following Ubuntu as an example. |
|
14 | - You need to install the following tools on the machine that is running an | |
|
15 | instance of |RCE|: | |||
|
16 | ``Apache HTTP Server`` and | |||
|
17 | ``mod_dav_svn``. | |||
|
18 | ||||
|
19 | ||||
|
20 | Using Ubuntu Distribution as an example you can run: | |||
16 |
|
21 | |||
17 | .. code-block:: bash |
|
22 | .. code-block:: bash | |
18 |
|
23 | |||
@@ -32,41 +37,80 b' Configuring Apache Setup' | |||||
32 | It is recommended to run Apache on a port other than 80, due to possible |
|
37 | It is recommended to run Apache on a port other than 80, due to possible | |
33 | conflicts with other HTTP servers like nginx. To do this, set the |
|
38 | conflicts with other HTTP servers like nginx. To do this, set the | |
34 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example |
|
39 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example | |
35 | ``Listen 8090`` |
|
40 | ``Listen 8090``. | |
|
41 | ||||
|
42 | ||||
|
43 | .. warning:: | |||
36 |
|
44 | |||
37 | It is also recommended to run apache as the same user as |RCE|, otherwise |
|
45 | Make sure your Apache instance which runs the mod_dav_svn module is | |
38 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` |
|
46 | only accessible by RhodeCode. 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`` | |||
39 |
|
51 | |||
40 | .. code-block:: apache |
|
52 | .. code-block:: apache | |
41 |
|
53 | |||
42 |
export APACHE_RUN_USER= |
|
54 | export APACHE_RUN_USER=rhodecode | |
43 |
export APACHE_RUN_GROUP= |
|
55 | export APACHE_RUN_GROUP=rhodecode | |
44 |
|
56 | |||
45 | 1. To configure Apache, create and edit a virtual hosts file, for example |
|
57 | 1. To configure Apache, create and edit a virtual hosts file, for example | |
46 |
:file:`/etc/apache2/sites-available/default.conf` |
|
58 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example | |
47 | virtual hosts file and add a location section inside the |
|
59 | how to use one with auto-generated config ```mod_dav_svn.conf``` | |
48 | ``<VirtualHost>`` section. |
|
60 | from configured |RCE| instance. | |
49 |
|
61 | |||
50 | .. code-block:: apache |
|
62 | .. code-block:: apache | |
51 |
|
63 | |||
52 | <Location /> |
|
64 | <VirtualHost *:8080> | |
53 | DAV svn |
|
65 | ServerAdmin rhodecode-admin@localhost | |
54 | # Must be explicit path, relative not supported |
|
66 | DocumentRoot /var/www/html | |
55 | SVNParentPath /PATH/TO/REPOSITORIES |
|
67 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |
56 | SVNListParentPath On |
|
68 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |
57 | Allow from all |
|
69 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf | |
58 | Order allow,deny |
|
70 | </VirtualHost> | |
59 | </Location> |
|
|||
60 |
|
71 | |||
61 | .. note:: |
|
|||
62 |
|
||||
63 | Once configured, check that you can see the list of repositories on your |
|
|||
64 | |RCE| instance. |
|
|||
65 |
|
|
72 | ||
66 | 2. Go to the :menuselection:`Admin --> Settings --> Labs` page, and |
|
73 | 2. Go to the :menuselection:`Admin --> Settings --> Labs` page, and | |
67 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the |
|
74 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the | |
68 | :guilabel:`Subversion HTTP Server URL`. |
|
75 | :guilabel:`Subversion HTTP Server URL`. | |
69 |
|
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 enable mapping of created |RCE| repo groups into special |svn| paths. | |||
|
84 | Each time a new repository group will be created the system will update | |||
|
85 | the template file, and create new mapping. Apache web server needs to be | |||
|
86 | reloaded to pick up the changes on this file. | |||
|
87 | It's recommended to add reload into a crontab so the changes can be picked | |||
|
88 | automatically once someone creates an repository group inside RhodeCode. | |||
|
89 | ||||
|
90 | ||||
|
91 | .. code-block:: ini | |||
|
92 | ||||
|
93 | ############################################## | |||
|
94 | ### Subversion proxy support (mod_dav_svn) ### | |||
|
95 | ############################################## | |||
|
96 | ## Enable or disable the config file generation. | |||
|
97 | svn.proxy.generate_config = true | |||
|
98 | ## Generate config file with `SVNListParentPath` set to `On`. | |||
|
99 | svn.proxy.list_parent_path = true | |||
|
100 | ## Set location and file name of generated config file. | |||
|
101 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |||
|
102 | ## File system path to the directory containing the repositories served by | |||
|
103 | ## RhodeCode. | |||
|
104 | svn.proxy.parent_path_root = /path/to/repo_store | |||
|
105 | ## Used as a prefix to the <Location> block in the generated config file. In | |||
|
106 | ## most cases it should be set to `/`. | |||
|
107 | svn.proxy.location_root = / | |||
|
108 | ||||
|
109 | ||||
|
110 | This would create a special template file called ```mod_dav_svn.conf```. We | |||
|
111 | used that file path in the apache config above inside the Include statement. | |||
|
112 | ||||
|
113 | ||||
70 | Using |svn| |
|
114 | Using |svn| | |
71 | ^^^^^^^^^^^ |
|
115 | ^^^^^^^^^^^ | |
72 |
|
116 |
General Comments 0
You need to be logged in to leave comments.
Login now