Commit 303e29ee authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

runner: move dav and public access to apache

NOTE: the two of them go together in the case they are use for HTML5 development
parent 8f84fdae
...@@ -22,6 +22,8 @@ LoadModule alias_module modules/mod_alias.so ...@@ -22,6 +22,8 @@ LoadModule alias_module modules/mod_alias.so
LoadModule env_module modules/mod_env.so LoadModule env_module modules/mod_env.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule rewrite_module modules/mod_rewrite.so
LoadModule log_config_module modules/mod_log_config.so LoadModule log_config_module modules/mod_log_config.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
ErrorLog "{{ parameters.path_error_log }}" ErrorLog "{{ parameters.path_error_log }}"
LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t \"%r\" %>s %b" common
...@@ -40,6 +42,27 @@ SSLHonorCipherOrder On ...@@ -40,6 +42,27 @@ SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH SSLCipherSuite RC4-SHA:HIGH:!ADH
SSLEngine On SSLEngine On
Alias /public {{ parameters.runner_home }}/public
<Directory {{ parameters.runner_home }}/public>
Order Allow,Deny
Allow from all
Satisfy Any
Options Indexes FollowSymLinks
</Directory>
DavLockDB {{ parameters.var_dir }}/DavLock
Alias /share {{ parameters.runner_home }}
<Directory {{ parameters.runner_home }}>
DirectoryIndex disabled
DAV On
Options Indexes FollowSymLinks
AuthType Basic
AuthName "webdav"
AuthUserFile "{{ parameters.etc_dir }}/.htpasswd"
Require valid-user
</Directory>
ScriptSock {{ parameters.path_pid }} ScriptSock {{ parameters.path_pid }}
SetEnv GIT_PROJECT_ROOT {{ parameters.project_folder }} SetEnv GIT_PROJECT_ROOT {{ parameters.project_folder }}
......
...@@ -302,8 +302,10 @@ monitor_index = $${deploy-index:rendered} ...@@ -302,8 +302,10 @@ monitor_index = $${deploy-index:rendered}
working_directory = $${slaprunner:working-directory} working_directory = $${slaprunner:working-directory}
dav_lock = $${directory:var}/DavLock dav_lock = $${directory:var}/DavLock
etc_dir = $${directory:etc} etc_dir = $${directory:etc}
var_dir = $${directory:var}
document_root = $${directory:www} document_root = $${directory:www}
project_folder = $${directory:project} project_folder = $${directory:project}
runner_home = $${runnerdirectory:home}
git_http_backend = ${git:location}/libexec/git-core/git-http-backend git_http_backend = ${git:location}/libexec/git-core/git-http-backend
cgi_httpd_conf = $${cgi-httpd-configuration-file:output} cgi_httpd_conf = $${cgi-httpd-configuration-file:output}
...@@ -423,9 +425,9 @@ backend_url = $${slaprunner:access-url} ...@@ -423,9 +425,9 @@ backend_url = $${slaprunner:access-url}
access_url = $${:url}/login access_url = $${:url}/login
url = https://$${request-frontend:connection-domain} url = https://$${request-frontend:connection-domain}
ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port} ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port}
webdav_url = https://$${request-frontend:connection-domain}/share
monitor_url = https://$${monitor-frontend:connection-domain} monitor_url = https://$${monitor-frontend:connection-domain}
public_url = $${:url}/public/ webdav_url = $${:monitor_url}/share/
public_url = $${:monitor_url}/public/
#--------------------------- #---------------------------
#-- #--
......
...@@ -64,22 +64,5 @@ http { ...@@ -64,22 +64,5 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Host $http_host;
} }
location /public/ {
root {{ param_nginx_frontend['work_dir'] }};
index index.html index.htm;
}
location /share {
rewrite ^/share / break;
auth_basic "Restricted";
auth_basic_user_file {{ param_nginx_frontend['etc_dir'] }}/.htpasswd;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
root {{ param_nginx_frontend['work_dir'] }};
create_full_put_path on;
}
} }
} }
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 to comment