Files
WPIQ/wo/cli/templates/virtualconf.mustache

72 lines
2.1 KiB
Plaintext
Raw Normal View History

2018-11-13 21:55:59 +01:00
server {
{{#multisite}}
# Uncomment the following line for domain mapping
# listen 80 default_server;
{{/multisite}}
2019-03-18 05:55:00 +01:00
server_name {{site_name}} {{#multisite}}*{{/multisite}}{{^multisite}}www{{/multisite}}.{{site_name}};
2018-11-13 21:55:59 +01:00
{{#multisite}}
# Uncomment the following line for domain mapping
#server_name_in_redirect off;
{{/multisite}}
2019-03-27 04:58:25 +01:00
access_log /var/log/nginx/{{site_name}}.access.log {{^wpredis}}{{^static}}rt_cache{{/static}}{{/wpredis}}{{#wpredis}}rt_cache_redis{{/wpredis}};
2018-11-13 21:55:59 +01:00
error_log /var/log/nginx/{{site_name}}.error.log;
2023-08-06 12:55:26 +02:00
{{#alias}}
location / {
return 301 https://{{alias_name}}$request_uri;
}
2023-08-06 13:12:55 +02:00
{{/alias}}
2018-11-13 21:55:59 +01:00
{{#proxy}}
add_header X-Proxy-Cache $upstream_cache_status;
location / {
proxy_pass http://{{host}}:{{port}};
proxy_redirect off;
2019-12-06 10:15:49 +01:00
include proxy_params;
2018-11-13 21:55:59 +01:00
}
2023-08-06 15:47:24 +02:00
{{#alias}}
# 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;
}
2023-08-06 15:47:24 +02:00
{{/alias}}
2018-11-13 21:55:59 +01:00
{{/proxy}}
{{^proxy}}
2023-08-06 12:55:26 +02:00
{{^alias}}
2023-12-09 14:15:39 -07:00
{{^subsite}}
2019-03-18 05:55:00 +01:00
root {{webroot}}/htdocs;
2023-12-09 14:15:39 -07:00
{{/subsite}}
{{#subsite}}
root {{subsite_webroot}}/htdocs;
{{/subsite}}
2019-03-27 04:58:25 +01:00
index {{^static}}index.php{{/static}} index.html index.htm;
2018-11-13 21:55:59 +01:00
{{#static}}
location / {
try_files $uri $uri/ =404;
}
{{/static}}
{{^static}}include {{#basic}}common/{{wo_php}}.conf;{{/basic}}{{#wpfc}}common/wpfc-{{wo_php}}.conf;{{/wpfc}}{{#wpsc}}common/wpsc-{{wo_php}}.conf;{{/wpsc}}{{#wpredis}}common/redis-{{wo_php}}.conf;{{/wpredis}}{{#wprocket}}common/wprocket-{{wo_php}}.conf;{{/wprocket}}{{#wpce}}common/wpce-{{wo_php}}.conf;{{/wpce}}
2019-03-13 05:02:53 +01:00
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
{{#wp}}include common/wpcommon-{{wo_php}}.conf;{{/wp}}
2023-08-06 13:49:41 +02:00
include common/locations-wo.conf;{{/alias}}{{/proxy}}
2019-03-18 05:55:00 +01:00
include {{webroot}}/conf/nginx/*.conf;
2019-03-27 04:58:25 +01:00
2018-11-13 21:55:59 +01:00
}