sce/roles/nginx/templates/nginx-server.j2
Ivo C.S. Wingelaar 33a9eef0fa
Add basic nginx role
This role installs a distribution-provided nginx and does some basic
configuration on it. It acts as a reverse proxy for the containers
that does the TLS offloading and provides an optional HTTP basic
authentication page for services that aren't ready to be exposed yet.
2024-10-13 11:33:33 +02:00

19 lines
437 B
Django/Jinja

# {{ ansible_managed }}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name {{ site_name }};
ssl_certificate {{ sce_nginx_certificate_path }}/{{ site_name }}/fullchain.pem;
ssl_certificate_key {{ sce_nginx_certificate_path }}/{{ site_name }}/privkey.pem;
{% if auth %}
auth_basic "SCE";
auth_basic_user_file /etc/nginx/passwdfile;
{% endif %}
location / {
proxy_pass http://127.0.0.1:{{ site_port }};
}
}