129 | | ### |
130 | | ### project1 |
131 | | ### |
132 | | Alias /project1/dox /var/www/dev.domain.tld/htdocs/project1/dox |
133 | | |
134 | | <Location /project1/svn> |
135 | | <IfDefine SVN> |
136 | | DAV svn |
137 | | SVNPath /var/svn/project1 |
138 | | SVNIndexXSLT /project1/trac/svnindex.xsl |
139 | | </IfDefine> |
140 | | |
141 | | <LimitExcept GET PROPFIND OPTIONS REPORT> |
142 | | AuthType Basic |
143 | | AuthName "project1::svn" |
144 | | |
145 | | <IfModule mod_auth_ldap.c> |
146 | | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
147 | | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
148 | | </IfModule> |
149 | | </LimitExcept> |
150 | | </Location> |
151 | | |
| 129 | ### |
| 130 | ### project1 |
| 131 | ### |
| 132 | Alias /project1/dox /var/www/dev.domain.tld/htdocs/project1/dox |
| 133 | |
| 134 | <Location /project1/svn> |
| 135 | <IfDefine SVN> |
| 136 | DAV svn |
| 137 | SVNPath /var/svn/project1 |
| 138 | SVNIndexXSLT /project1/trac/svnindex.xsl |
| 139 | </IfDefine> |
| 140 | |
| 141 | <LimitExcept GET PROPFIND OPTIONS REPORT> |
| 142 | AuthType Basic |
| 143 | AuthName "project1::svn" |
| 144 | |
| 145 | <IfModule mod_auth_ldap.c> |
| 146 | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
| 147 | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
| 148 | </IfModule> |
| 149 | </LimitExcept> |
| 150 | </Location> |
| 151 | |
| 152 | <Location /project1> |
| 153 | SetEnv TRAC_ENV "/var/lib/trac/project1" |
| 154 | </Location> |
| 155 | |
| 156 | <Location /project1/login> |
| 157 | AuthType Basic |
| 158 | AuthName "project1::trac" |
| 159 | |
| 160 | <IfModule mod_auth_ldap.c> |
| 161 | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
| 162 | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
| 163 | </IfModule> |
| 164 | </Location> |
| 165 | |
| 166 | Alias /project1/trac /var/www/dev.domain.tld/htdocs/project1/trac |
| 167 | ScriptAlias /project1 /var/www/dev.domain.tld/cgi-bin/trac.cgi |
| 168 | }}} |
| 169 | As you can see, I make a big use of Locations and Aliases. Now, some comments. |
| 170 | 4.2.1. Trac stuff |
| 171 | |
| 172 | We need several directives to make Trac work. The first thing is to set the TRAC_ENV environment variable. This variable indicates to trac.cgi the location of the Trac environment corresponding to project1 in the filesystem. Actually, I'm storing every Trac environment under /var/lib/trac/, so the projectX Trac environment can be found under /var/lib/trac/projectX/. |
| 173 | |
| 174 | That's why we set the TRAC_ENV for the entire /project1 web space, with the following: |
| 175 | {{{ |
155 | | |
156 | | <Location /project1/login> |
157 | | AuthType Basic |
158 | | AuthName "project1::trac" |
159 | | |
160 | | <IfModule mod_auth_ldap.c> |
161 | | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
162 | | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
163 | | </IfModule> |
164 | | </Location> |
165 | | |
166 | | Alias /project1/trac /var/www/dev.domain.tld/htdocs/project1/trac |
| 179 | }}} |
| 180 | Then we redirect every request for /project1/* to trac.cgi with the ScriptAlias directive: |
| 181 | {{{ |
169 | | As you can see, I make a big use of Locations and Aliases. Now, some comments. |
170 | | 4.2.1. Trac stuff |
171 | | |
172 | | We need several directives to make Trac work. The first thing is to set the TRAC_ENV environment variable. This variable indicates to trac.cgi the location of the Trac environment corresponding to project1 in the filesystem. Actually, I'm storing every Trac environment under /var/lib/trac/, so the projectX Trac environment can be found under /var/lib/trac/projectX/. |
173 | | |
174 | | That's why we set the TRAC_ENV for the entire /project1 web space, with the following: |
175 | | {{{ |
176 | | <Location /project1> |
177 | | SetEnv TRAC_ENV "/var/lib/trac/project1" |
178 | | </Location> |
179 | | }}} |
180 | | Then we redirect every request for /project1/* to trac.cgi with the ScriptAlias directive: |
181 | | {{{ |
182 | | ScriptAlias /project1 /var/www/dev.domain.tld/cgi-bin/trac.cgi |
183 | | }}} |
188 | | <Location /project1/login> |
189 | | AuthType Basic |
190 | | AuthName "project1::trac" |
191 | | |
192 | | <IfModule mod_auth_ldap.c> |
193 | | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
194 | | |
195 | | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
196 | | </IfModule> |
197 | | </Location> |
| 188 | <Location /project1/login> |
| 189 | AuthType Basic |
| 190 | AuthName "project1::trac" |
| 191 | |
| 192 | <IfModule mod_auth_ldap.c> |
| 193 | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
| 194 | |
| 195 | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
| 196 | </IfModule> |
| 197 | </Location> |
222 | | <Location /project1/svn> |
223 | | <IfDefine SVN> |
224 | | DAV svn |
225 | | SVNPath /var/svn/project1 |
226 | | SVNIndexXSLT /project1/trac/svnindex.xsl |
227 | | </IfDefine> |
228 | | |
229 | | <LimitExcept GET PROPFIND OPTIONS REPORT> |
230 | | AuthType Basic |
231 | | AuthName "project1::svn" |
232 | | |
233 | | <IfModule mod_auth_ldap.c> |
234 | | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
235 | | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
236 | | </IfModule> |
237 | | </LimitExcept> |
238 | | </Location> |
| 222 | <Location /project1/svn> |
| 223 | <IfDefine SVN> |
| 224 | DAV svn |
| 225 | SVNPath /var/svn/project1 |
| 226 | SVNIndexXSLT /project1/trac/svnindex.xsl |
| 227 | </IfDefine> |
| 228 | |
| 229 | <LimitExcept GET PROPFIND OPTIONS REPORT> |
| 230 | AuthType Basic |
| 231 | AuthName "project1::svn" |
| 232 | |
| 233 | <IfModule mod_auth_ldap.c> |
| 234 | AuthLDAPURL ldap://ldap.domain.tld:389/ou=users,dc=domain,dc=tld?uid?one |
| 235 | Require group cn=project1,ou=dev,ou=groups,dc=domain,dc=tld |
| 236 | </IfModule> |
| 237 | </LimitExcept> |
| 238 | </Location> |