Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions templates/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,32 @@ server {
try_files $uri @rewrite;
}

location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
location ~ \..*/.*\.php$ {
return 403;
}

location ~ \..*/.*\.php$ {
location ~* ^/\.well-known/.*\.php$ {
return 403;
}

location ~ ^/sites/.*/private/ {
location ~* ^/\.well-known(/|$) {
location ~* ^/\.well-known/.*\.txt$ {
allow all;
}
return 403;
}

location ~ ^/sites/[^/]+/files/.*\.php$ {
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
}

location ~* ^/.well-known/ {
allow all;
location ~ ^/sites/.*/private/ {
return 403;
}

location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}

location ~ (^|/)\. {
Expand Down
Loading