Skip to content
Snippets Groups Projects
Commit 7310dbe7 authored by Francisco Borges Aurindo Barros's avatar Francisco Borges Aurindo Barros Committed by Konstantinos Samaras-Tsakiris
Browse files

Drupal webdav

parent a3c0d802
No related branches found
No related tags found
1 merge request!17Drupal webdav
......@@ -12,7 +12,6 @@ ENV DRUPAL_SHARED_VOLUME /drupal-data
# Nginx default configuration
ADD config/default.conf /etc/nginx/conf.d/default.conf
ADD config/webdav.conf /etc/nginx/conf.d/webdav.conf
ADD config/nginx.conf /etc/nginx/nginx.conf
### n.b.: https://www.redpill-linpro.com/sysadvent/2017/12/10/jekyll-openshift.html
......
upstream php {
server unix:/var/run/drupal.sock;
}
upstream webdav {
server unix:/var/run/webdav.sock;
}
server {
#listen 8080 ssl;
......@@ -34,6 +37,26 @@ server {
fastcgi_pass php;
allow all;
}
# WebDAV Page
location ^~ /_webdav {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
# Security note: If you're running a version of PHP older than the
# latest 5.3, you should have "cgi.fix_pathinfo = 0;" in php.ini.
# See http://serverfault.com/q/627903/94922 for details.
include fastcgi_params;
# CGI_PARAM list: https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/.
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
# this is the script name as it is seen from the HTTP side.
fastcgi_param SCRIPT_NAME /_webdav;
# this is the local path to the script
fastcgi_param SCRIPT_FILENAME /webdav/server.php;
fastcgi_param REQUEST_METHOD "GET";
fastcgi_param QUERY_STRING $query_string;
fastcgi_pass webdav;
}
# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
......
server {
listen 8081;
root /var/run/app/web/sites/default;
auth_basic "Authorization required";
# The file containing authorized users
auth_basic_user_file /etc/nginx/webdav/password;
# dav allowed method
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access user:rw group:rw all:r;
# MAX size of uploaded file, 0 mean unlimited
client_max_body_size 0;
# Allow autocreate folder if necessary
create_full_put_path on;
autoindex on;
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment