1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/abantecart_ynh.git synced 2024-09-03 18:06:16 +02:00

Secure PHP Backend

This commit is contained in:
myprivacyisgone 2022-01-16 18:58:18 +08:00 committed by GitHub
parent 6578c704de
commit 7ce69050a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@ location __PATH__/ {
}
client_max_body_size 30m;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
@ -26,6 +27,29 @@ location __PATH__/ {
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~* \.(jpg|jpeg|png|gif|css|js|ico|webp)$ {
expires max;
log_not_found off;
}
location ~ /(system/logs|resources/download) {
deny all;
return 403;
}
location /admin/ {
location ~ .*\.(php)?$ {
deny all;
return 403;
}
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
}