improve virtualconf template
This commit is contained in:
@@ -20,6 +20,15 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
return 301 https://{{alias_name}}$request_uri;
|
return 301 https://{{alias_name}}$request_uri;
|
||||||
}
|
}
|
||||||
|
{{/alias}}
|
||||||
|
{{#proxy}}
|
||||||
|
add_header X-Proxy-Cache $upstream_cache_status;
|
||||||
|
location / {
|
||||||
|
proxy_pass http://{{host}}:{{port}};
|
||||||
|
proxy_redirect off;
|
||||||
|
include proxy_params;
|
||||||
|
}
|
||||||
|
{{#alias}}
|
||||||
# Security settings for better privacy
|
# Security settings for better privacy
|
||||||
# Deny hidden files
|
# Deny hidden files
|
||||||
location ~ /\.(?!well-known\/) {
|
location ~ /\.(?!well-known\/) {
|
||||||
@@ -32,25 +41,6 @@ server {
|
|||||||
auth_basic off;
|
auth_basic off;
|
||||||
}
|
}
|
||||||
{{/alias}}
|
{{/alias}}
|
||||||
{{#proxy}}
|
|
||||||
add_header X-Proxy-Cache $upstream_cache_status;
|
|
||||||
location / {
|
|
||||||
proxy_pass http://{{host}}:{{port}};
|
|
||||||
proxy_redirect off;
|
|
||||||
include proxy_params;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Security settings for better privacy
|
|
||||||
# Deny hidden files
|
|
||||||
location ~ /\.(?!well-known\/) {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
# letsencrypt validation
|
|
||||||
location /.well-known/acme-challenge/ {
|
|
||||||
alias /var/www/html/.well-known/acme-challenge/;
|
|
||||||
allow all;
|
|
||||||
auth_basic off;
|
|
||||||
}
|
|
||||||
{{/proxy}}
|
{{/proxy}}
|
||||||
|
|
||||||
{{^proxy}}
|
{{^proxy}}
|
||||||
|
|||||||
Reference in New Issue
Block a user