Browse Source

roles/nginx: fix indentation in templates

python3
Zolfa 5 years ago
parent
commit
cea0a71c83
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
2 changed files with 18 additions and 18 deletions
  1. +2
    -2
      roles/nginx/templates/base.j2
  2. +16
    -16
      roles/nginx/templates/service.conf

+ 2
- 2
roles/nginx/templates/base.j2 View File

@ -2,7 +2,7 @@ server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
{% if proxy_protocol %}
{% if proxy_protocol %}
# Alternate Port for PROXY PROTOCOL incoming connections
listen 10443 ssl http2 proxy_protocol;
listen [::]:10443 ssl http2 proxy_protocol;
@ -10,7 +10,7 @@ server {
# RealIP rewrite authorized for connection from reverse-proxy
set_real_ip_from {{ hostvars | ip_from_inventory('vm_gateway') }};
real_ip_header proxy_protocol;
{% endif %}
{% endif %}
ssl_certificate /etc/letsencrypt/live/{{ server_fqdn }}/fullchain.pem;


+ 16
- 16
roles/nginx/templates/service.conf View File

@ -1,20 +1,20 @@
{% block proxy_conf %}
{#
This is the default block that gets included if the
child template does not declare a {% block proxy_conf %}
#}
location /{{ proxy_location_path | default("")}} {
client_max_body_size {{ max_body_size | default(8) }}M;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
{{ proxy_type | default("proxy_pass") }} {{ remote_host | default("http://127.0.0.1:8080") }};
{% block root %}
{% endblock %}
{#
This is the default block that gets included if the
child template does not declare a {% block proxy_conf %}
#}
location /{{ proxy_location_path | default("")}} {
client_max_body_size {{ max_body_size | default(8) }}M;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
{{ proxy_type | default("proxy_pass") }} {{ remote_host | default("http://127.0.0.1:8080") }};
{% block root %}
{% endblock %}
}
{% endblock %}


Loading…
Cancel
Save