Fix serving of gerrit repos with '/p' in url

This change is similiar to I70d814a5eae
By default /p is served by gerrit itself so the normal proxying to
gerrit makes /p work. However for us we want /p to bypass gerrit
and hit the local git repo replica which requires running a git cgi
script so apache needs to be told that it is ok to do that.

It was giving the following error:
'fatal: unable to access 'https://review-dev.openstack.org/p/gtest-org/test2/':
The requested URL returned error: 403'

Change-Id: Iffdcefb2215a468fce3836d46377f4d1344e73b9
This commit is contained in:
Khai Do
2015-02-19 17:03:21 -08:00
parent c2b08624b7
commit 6805db6ba4
2 changed files with 9 additions and 1 deletions

View File

@@ -358,6 +358,11 @@ class gerrit(
a2mod { 'proxy_http':
ensure => present,
}
if ! defined(A2mod['cgi']) {
a2mod { 'cgi':
ensure => present,
}
}
if $ssl_cert_file_contents != '' {
file { $ssl_cert_file:

View File

@@ -83,7 +83,10 @@
Order allow,deny
Allow from all
</Directory>
<Directory /usr/lib/git-core>
Allow from all
Satisfy Any
</Directory>
</VirtualHost>
</IfModule>