59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
|
|
server {
|
|
|
|
{{#multisite}}
|
|
# Uncomment the following line for domain mapping
|
|
# listen 80 default_server;
|
|
{{/multisite}}
|
|
|
|
server_name {{site_name}} {{#multisite}}*{{/multisite}}{{^multisite}}www{{/multisite}}.{{site_name}};
|
|
|
|
{{#multisite}}
|
|
# Uncomment the following line for domain mapping
|
|
#server_name_in_redirect off;
|
|
{{/multisite}}
|
|
|
|
access_log /var/log/nginx/{{site_name}}.access.log {{^wpredis}}{{^static}}rt_cache{{/static}}{{/wpredis}}{{#wpredis}}rt_cache_redis{{/wpredis}};
|
|
error_log /var/log/nginx/{{site_name}}.error.log;
|
|
|
|
{{#proxy}}
|
|
add_header X-Proxy-Cache $upstream_cache_status;
|
|
location / {
|
|
proxy_pass http://{{host}}:{{port}};
|
|
proxy_redirect off;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
# 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;
|
|
}
|
|
{{/proxy}}
|
|
|
|
{{^proxy}}
|
|
root {{webroot}}/htdocs;
|
|
|
|
index {{^static}}index.php{{/static}} index.html index.htm;
|
|
|
|
{{#static}}
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
{{/static}}
|
|
|
|
{{^static}}include {{#basic}}common/php73.conf;{{/basic}}{{#wpfc}}common/wpfc-php73.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php73.conf;{{/wpsc}}{{#wpredis}}common/redis-php73.conf;{{/wpredis}}{{#wprocket}}common/wprocket-php73.conf;{{/wprocket}}
|
|
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
|
|
{{#wp}}include common/wpcommon-php73.conf;{{/wp}}
|
|
include common/locations-wo.conf;{{/proxy}}
|
|
include {{webroot}}/conf/nginx/*.conf;
|
|
|
|
}
|