Files
@ 052eefc4fab0
Branch filter:
Location: majic-ansible-roles/roles/wsgi_website/templates/nginx_site.j2 - annotation
052eefc4fab0
1.1 KiB
text/plain
MAR-5: Ignore certificate and key files in TLS sub-directory (include GnuTLS templates). Updated test site docs to describe all playbooks. Updated test site set-up instructions to include sample commands for generating the keys/certs. Added two roles to test site for deploying simple PHP/WSGI websites.
981584549895 d26fe0368a4b 981584549895 981584549895 981584549895 d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b d26fe0368a4b bd13e65e0e94 981584549895 981584549895 981584549895 bd13e65e0e94 bd13e65e0e94 981584549895 bd13e65e0e94 981584549895 981584549895 981584549895 981584549895 981584549895 bd13e65e0e94 bd13e65e0e94 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 981584549895 | server {
# Base settings.
root {{ home }}/htdocs/;
server_name {{ fqdn }};
# HTTP (plaintext) configuration.
listen 80;
# HTTPS (TLS) configuration.
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate_key /etc/ssl/private/{{ https_tls_key | basename }};
ssl_certificate /etc/ssl/certs/{{ https_tls_certificate | basename }};
{% if rewrites -%}
# Site rewrites.
{% for rewrite in rewrites -%}
rewrite {{ rewrite }};
{% endfor -%}
{% endif %}
{% if static_locations -%}
# Static locations
{% for location in static_locations -%}
location {{ location }} {
try_files $uri $uri/ =404;
}
{% endfor -%}
{% endif %}
# Pass remaining requests to the WSGI server.
location / {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unix:/run/wsgi/{{ fqdn }}.sock;
}
access_log /var/log/nginx/{{ fqdn }}-access.log;
error_log /var/log/nginx/{{ fqdn }}-error.log;
}
|