|
@@ -32,6 +32,9 @@ server {
|
|
server_name "{{ domain }}";
|
|
server_name "{{ domain }}";
|
|
{%- endif %}
|
|
{%- endif %}
|
|
|
|
|
|
|
|
+ access_log /var/log/nginx/{{ domain }}.access.log;
|
|
|
|
+ error_log /var/log/nginx/{{ domain }}.error.log;
|
|
|
|
+
|
|
{%- if https %}
|
|
{%- if https %}
|
|
ssl on;
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/{{ domain }}.cert.pem;
|
|
ssl_certificate /etc/ssl/certs/{{ domain }}.cert.pem;
|
|
@@ -44,6 +47,7 @@ server {
|
|
proxy_redirect default;
|
|
proxy_redirect default;
|
|
proxy_set_header Host "{{ host }}";
|
|
proxy_set_header Host "{{ host }}";
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
+ include /etc/nginx/ffho.d/proxy-headers.conf;
|
|
}
|
|
}
|
|
{%- elif 'redirect' in config %}
|
|
{%- elif 'redirect' in config %}
|
|
location / {
|
|
location / {
|
|
@@ -58,6 +62,7 @@ server {
|
|
proxy_redirect default;
|
|
proxy_redirect default;
|
|
proxy_set_header Host "{{ loc_host }}";
|
|
proxy_set_header Host "{{ loc_host }}";
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
+ include /etc/nginx/ffho.d/proxy-headers.conf;
|
|
{%- elif 'redirect' in loc_conf %}
|
|
{%- elif 'redirect' in loc_conf %}
|
|
return 302 {{ loc_conf.redirect }};
|
|
return 302 {{ loc_conf.redirect }};
|
|
{%- endif %}
|
|
{%- endif %}
|