##// END OF EJS Templates
svn-docs: update the intruction on new svn-http setup....
marcink -
r790:e9f6bbd7 stable
parent child Browse files
Show More
@@ -1,128 +1,130 b''
1 1 .. _svn-http:
2 2
3 3 |svn| With Write Over HTTP
4 4 --------------------------
5 5
6 6 To use |svn| with read/write support over the |svn| protocol, you have to
7 7 configure HTTP |svn| backend.
8 8
9 9 Prerequisites
10 10 ^^^^^^^^^^^^^
11 11
12 12 - Enable HTTP support inside labs setting on your |RCE| instance,
13 13 see :ref:`lab-settings`.
14 14 - You need to install the following tools on the machine that is running an
15 15 instance of |RCE|:
16 16 ``Apache HTTP Server`` and
17 17 ``mod_dav_svn``.
18 18
19 19
20 20 Using Ubuntu Distribution as an example you can run:
21 21
22 22 .. code-block:: bash
23 23
24 24 $ sudo apt-get install apache2 libapache2-mod-svn
25 25
26 Once installed you need to enable ``dav_svn``:
26 Once installed you need to enable ``dav_svn`` and ``anon``:
27 27
28 28 .. code-block:: bash
29 29
30 30 $ sudo a2enmod dav_svn
31 $ sudo a2enmod authn_anon
32
31 33
32 34 Configuring Apache Setup
33 35 ^^^^^^^^^^^^^^^^^^^^^^^^
34 36
35 37 .. tip::
36 38
37 39 It is recommended to run Apache on a port other than 80, due to possible
38 40 conflicts with other HTTP servers like nginx. To do this, set the
39 41 ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
40 42 ``Listen 8090``.
41 43
42 44
43 45 .. warning::
44 46
45 47 Make sure your Apache instance which runs the mod_dav_svn module is
46 48 only accessible by RhodeCode. Otherwise everyone is able to browse
47 49 the repositories or run subversion operations (checkout/commit/etc.).
48 50
49 51 It is also recommended to run apache as the same user as |RCE|, otherwise
50 52 permission issues could occur. To do this edit the ``/etc/apache2/envvars``
51 53
52 54 .. code-block:: apache
53 55
54 56 export APACHE_RUN_USER=rhodecode
55 57 export APACHE_RUN_GROUP=rhodecode
56 58
57 59 1. To configure Apache, create and edit a virtual hosts file, for example
58 60 :file:`/etc/apache2/sites-available/default.conf`. Below is an example
59 61 how to use one with auto-generated config ```mod_dav_svn.conf```
60 62 from configured |RCE| instance.
61 63
62 64 .. code-block:: apache
63 65
64 66 <VirtualHost *:8080>
65 67 ServerAdmin rhodecode-admin@localhost
66 68 DocumentRoot /var/www/html
67 ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
68 CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
69 ErrorLog ${APACHE_LOG_DIR}/error.log
70 CustomLog ${APACHE_LOG_DIR}/access.log combined
69 71 Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
70 72 </VirtualHost>
71 73
72 74
73 75 2. Go to the :menuselection:`Admin --> Settings --> Labs` page, and
74 76 enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
75 77 :guilabel:`Subversion HTTP Server URL`.
76 78
77 79 3. Open the |RCE| configuration file,
78 80 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
79 81
80 82 4. Add the following configuration option in the ``[app:main]``
81 83 section if you don't have it yet.
82 84
83 85 This enable mapping of created |RCE| repo groups into special |svn| paths.
84 86 Each time a new repository group will be created the system will update
85 87 the template file, and create new mapping. Apache web server needs to be
86 88 reloaded to pick up the changes on this file.
87 89 It's recommended to add reload into a crontab so the changes can be picked
88 90 automatically once someone creates an repository group inside RhodeCode.
89 91
90 92
91 93 .. code-block:: ini
92 94
93 95 ##############################################
94 96 ### Subversion proxy support (mod_dav_svn) ###
95 97 ##############################################
96 98 ## Enable or disable the config file generation.
97 99 svn.proxy.generate_config = true
98 100 ## Generate config file with `SVNListParentPath` set to `On`.
99 101 svn.proxy.list_parent_path = true
100 102 ## Set location and file name of generated config file.
101 103 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
102 104 ## File system path to the directory containing the repositories served by
103 105 ## RhodeCode.
104 106 svn.proxy.parent_path_root = /path/to/repo_store
105 107 ## Used as a prefix to the <Location> block in the generated config file. In
106 108 ## most cases it should be set to `/`.
107 109 svn.proxy.location_root = /
108 110
109 111
110 112 This would create a special template file called ```mod_dav_svn.conf```. We
111 113 used that file path in the apache config above inside the Include statement.
112 114
113 115
114 116 Using |svn|
115 117 ^^^^^^^^^^^
116 118
117 119 Once |svn| has been enabled on your instance, you can use it using the
118 120 following examples. For more |svn| information, see the `Subversion Red Book`_
119 121
120 122 .. code-block:: bash
121 123
122 124 # To clone a repository
123 125 svn checkout http://my-svn-server.example.com/my-svn-repo
124 126
125 127 # svn commit
126 128 svn commit
127 129
128 130 .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
General Comments 0
You need to be logged in to leave comments. Login now