mirror of
https://github.com/cloudpanel-io/vhost-templates.git
synced 2026-05-18 08:23:31 +08:00
.
This commit is contained in:
@@ -21,9 +21,32 @@ server {
|
|||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ (^|/)\. {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
{{settings}}
|
{{settings}}
|
||||||
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
location ~ ^/sites/.*/files/styles/ {
|
||||||
|
try_files $uri @rewrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewrite {
|
||||||
|
rewrite ^/(.*)$ /index.php?q=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
|
||||||
|
try_files $uri /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request_uri ~* "^(.*/)index\.php/(.*)") {
|
||||||
|
return 307 $1$2;
|
||||||
|
}
|
||||||
|
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
@@ -39,7 +62,7 @@ server {
|
|||||||
fastcgi_param PHP_VALUE "{{php_settings}}";
|
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|ico|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
expires max;
|
expires max;
|
||||||
access_log off;
|
access_log off;
|
||||||
|
|||||||
@@ -21,9 +21,32 @@ server {
|
|||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ (^|/)\. {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
{{settings}}
|
{{settings}}
|
||||||
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
location ~ ^/sites/.*/files/styles/ {
|
||||||
|
try_files $uri @rewrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewrite {
|
||||||
|
rewrite ^/(.*)$ /index.php?q=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
|
||||||
|
try_files $uri /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request_uri ~* "^(.*/)index\.php/(.*)") {
|
||||||
|
return 307 $1$2;
|
||||||
|
}
|
||||||
|
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
@@ -39,7 +62,7 @@ server {
|
|||||||
fastcgi_param PHP_VALUE "{{php_settings}}";
|
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|ico|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
expires max;
|
expires max;
|
||||||
access_log off;
|
access_log off;
|
||||||
|
|||||||
Reference in New Issue
Block a user