diff --git a/software/slaprunner/httpd_conf.in b/software/slaprunner/httpd_conf.in index d466dc0d0bb494602fb5a18504a5f0ae0fd59d2f..2bde48dadd485e325ea1958cee5dfd4f2ebf1cbc 100644 --- a/software/slaprunner/httpd_conf.in +++ b/software/slaprunner/httpd_conf.in @@ -22,6 +22,8 @@ LoadModule alias_module modules/mod_alias.so LoadModule env_module modules/mod_env.so LoadModule rewrite_module modules/mod_rewrite.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 }}" LogFormat "%h %l %u %t \"%r\" %>s %b" common @@ -40,6 +42,27 @@ SSLHonorCipherOrder On SSLCipherSuite RC4-SHA:HIGH:!ADH 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 }} SetEnv GIT_PROJECT_ROOT {{ parameters.project_folder }} diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg index cf3aeb98146ced3797f285622e682e3b6feaecc9..458633691ecb3fc3d4f604c4dafbaaf34bc86e42 100644 --- a/software/slaprunner/instance-runner.cfg +++ b/software/slaprunner/instance-runner.cfg @@ -302,8 +302,10 @@ monitor_index = $${deploy-index:rendered} working_directory = $${slaprunner:working-directory} dav_lock = $${directory:var}/DavLock etc_dir = $${directory:etc} +var_dir = $${directory:var} document_root = $${directory:www} project_folder = $${directory:project} +runner_home = $${runnerdirectory:home} git_http_backend = ${git:location}/libexec/git-core/git-http-backend cgi_httpd_conf = $${cgi-httpd-configuration-file:output} @@ -423,9 +425,9 @@ backend_url = $${slaprunner:access-url} access_url = $${:url}/login url = https://$${request-frontend:connection-domain} 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} -public_url = $${:url}/public/ +webdav_url = $${:monitor_url}/share/ +public_url = $${:monitor_url}/public/ #--------------------------- #-- diff --git a/software/slaprunner/nginx_conf.in b/software/slaprunner/nginx_conf.in index 93055ad3ec442462be49f3318966e236f7c56234..080e5502f66550daf92fdd41ae083b552d3d58d6 100644 --- a/software/slaprunner/nginx_conf.in +++ b/software/slaprunner/nginx_conf.in @@ -64,22 +64,5 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 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; - } } }