openstack-ansible-os_keystone/templates/keystone_nginx.conf.j2
Kevin Carter ac9d598d33 Add systemd journal logging to the service config
The systemd journal would normally be populated with the standard out of
a service however with the use of uwsgi this is not actually happening
resulting in us only capturing the logs from the uwsgi process instead
of the service itself. This change implements journal logging in the
service config, which is part of OSLO logging.

OSLO logging docs found here: <https://docs.openstack.org/oslo.log/3.28.1/journal.html>

Change-Id: I943bd5f1ac767f83d853cee09a5857f6f9f0efff
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-26 16:01:29 +00:00

48 lines
1.5 KiB
Django/Jinja

# {{ ansible_managed }}
server {
listen {{ keystone_nginx_ports[item] }};
{% if keystone_ssl | bool and keystone_service_adminuri_proto == "https" %}
ssl on;
ssl_protocols {{ keystone_ssl_protocol }};
ssl_certificate {{ keystone_ssl_cert }};
ssl_certificate_key {{ keystone_ssl_key }};
ssl_trusted_certificate {{ keystone_ssl_ca_cert }};
ssl_ciphers {{ keystone_ssl_cipher_suite }};
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:2m;
ssl_session_timeout 2m;
{%- endif %}
{% for line in keystone_nginx_extra_conf %}
{{ line }}
{%- endfor %}
error_log syslog:server=unix:/dev/log;
access_log syslog:server=unix:/dev/log;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self' https: wss:;";
add_header X-Frame-Options {{ keystone_x_frame_options | default ('DENY') }};
real_ip_header X-Forwarded-For;
{% for ip in keystone_set_real_ip_from %}
set_real_ip_from {{ ip }};
{%- endfor %}
location / {
try_files $uri @yourapplication;
}
location @yourapplication {
include uwsgi_params;
uwsgi_pass 127.0.0.1:{{ keystone_uwsgi_ports[item]['socket'] }};
uwsgi_param SCRIPT_NAME '';
{% for header in keystone_extra_headers %}
add_header "{{ header['parameter'] }}" "{{ header['value'] }}";
{% endfor %}
}
}