Commit 32b40ae2 by Nicolas Wavrant

slaprunner: fix in httpd.conf for git repositories paths

parent e6ec959b
......@@ -43,7 +43,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in
md5sum = 2245e0f538b4c8e1ace71488038264ba
md5sum = b5644037da14e79576840975415ee1a4
mode = 0644
[template-runner-import-script]
......@@ -103,7 +103,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/httpd_conf.in
download-only = true
md5sum = ac92f32bd9a0d8c39657b80d4a80f5cc
md5sum = 444399390eb19c7e23dd06593c067b4d
filename = httpd_conf.in
mode = 0644
......
......@@ -80,10 +80,9 @@ ScriptAlias /git-public/ {{ parameters.git_http_backend }}/
RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
RewriteCond %{REQUEST_URI} /git-receive-pack$
RewriteRule ^/git/ - [E=AUTHREQUIRED:yes,E=GIT_PROJECT_ROOT:{{- parameters.project_private_folder -}}]
RewriteRule ^/git-public/ - [E=AUTHREQUIRED:yes,E=GIT_PROJECT_ROOT:{{- parameters.project_public_folder -}}]
<LocationMatch "^/git/">
SetEnv GIT_PROJECT_ROOT:{{- parameters.project_private_folder -}}
Order Deny,Allow
Deny from env=AUTHREQUIRED
......@@ -94,6 +93,7 @@ RewriteRule ^/git-public/ - [E=AUTHREQUIRED:yes,E=GIT_PROJECT_ROOT:{{- parameter
</LocationMatch>
<LocationMatch "^/git-public/">
SetEnv GIT_PROJECT_ROOT:{{- parameters.project_public_folder -}}
Order Deny,Allow
Deny from env=AUTHREQUIRED
......
......@@ -324,7 +324,7 @@ etc_dir = $${directory:etc}
var_dir = $${directory:var}
project_folder = $${directory:project}
project_private_folder = $${runnerdirectory:private-project}
project_public_folder = $${runnerdirectory:private-project}
project_public_folder = $${runnerdirectory:public-project}
runner_home = $${runnerdirectory:home}
git_http_backend = ${git:location}/libexec/git-core/git-http-backend
cgi_httpd_conf = $${monitor-httpd-configuration-file:rendered}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment