mirror of
https://github.com/cloudpanel-io/vhost-templates.git
synced 2026-05-18 08:23:31 +08:00
.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#{"rootDirectory":"web","phpVersion":"8.1"}
|
||||
#{"rootDirectory":"web","phpVersion":"8.3"}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -44,7 +44,7 @@ server {
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
|
||||
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
|
||||
@@ -87,6 +87,7 @@ server {
|
||||
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 alt-svc 'h3=":443"; ma=86400';
|
||||
try_files $uri @rewrite;
|
||||
expires max;
|
||||
access_log off;
|
||||
}
|
||||
@@ -94,4 +95,4 @@ server {
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
#{"rootDirectory":"web","phpVersion":"8.1"}
|
||||
#{"rootDirectory":"web","phpVersion":"8.3"}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen 443 quic;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 quic;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
http3 off;
|
||||
{{ssl_certificate_key}}
|
||||
{{ssl_certificate}}
|
||||
{{server_name}}
|
||||
@@ -13,7 +17,7 @@ server {
|
||||
{{nginx_error_log}}
|
||||
|
||||
if ($scheme != "https") {
|
||||
rewrite ^ https://$host$uri permanent;
|
||||
rewrite ^ https://$host$request_uri permanent;
|
||||
}
|
||||
|
||||
location ~ /.well-known {
|
||||
@@ -29,6 +33,8 @@ server {
|
||||
|
||||
{{settings}}
|
||||
|
||||
include /etc/nginx/global_settings;
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
@@ -38,7 +44,7 @@ server {
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
|
||||
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
|
||||
@@ -80,6 +86,8 @@ server {
|
||||
|
||||
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 alt-svc 'h3=":443"; ma=86400';
|
||||
try_files $uri @rewrite;
|
||||
expires max;
|
||||
access_log off;
|
||||
}
|
||||
@@ -87,4 +95,4 @@ server {
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user