mirror of
https://github.com/cloudpanel-io/vhost-templates.git
synced 2026-05-18 08:23:31 +08:00
Merge pull request #29 from sugeng-sulistiyawan/master
✨ Update configuration to deny access to hidden files and directories, include .map & .mjs files to ignore log for Yii 2 & Generic Template PHP
This commit is contained in:
@@ -39,13 +39,17 @@ server {
|
||||
fastcgi_param PHP_VALUE "{{php_settings}}";
|
||||
}
|
||||
|
||||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {
|
||||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map|mjs)$ {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
expires max;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(ht|svn|git) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
v2/Yii/Yii 2
10
v2/Yii/Yii 2
@@ -1,4 +1,4 @@
|
||||
#{"rootDirectory":"web","phpVersion":"7.4"}
|
||||
#{"rootDirectory":"web","phpVersion":"8.3"}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -39,13 +39,17 @@ server {
|
||||
fastcgi_param PHP_VALUE "{{php_settings}}";
|
||||
}
|
||||
|
||||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {
|
||||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map|mjs)$ {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
expires max;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(ht|svn|git) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user