nginx_site: Fix including config with custom port

This commit is contained in:
Timo Makinen 2025-07-24 18:31:52 +00:00
parent fd69bcdec0
commit 0df977f078
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,3 @@
ssl_client_certificate {{ tls_certs }}/ca.crt;
ssl_verify_client on;
{% for host in ssh_proxy_hosts %}
location /{{ host | hash('sha1') }}/ {
proxy_pass http://127.0.0.1:6000?token={{ host | hash('sha1') }};

View file

@ -29,7 +29,11 @@ server {
ssl_certificate {{ tls_certs }}/{{ nginx_site_name }}-fullchain.crt;
ssl_certificate_key {{ tls_private }}/{{ nginx_site_name }}.key;
{% include "./{}.conf.j2".format(nginx_site_name) ignore missing %}
{% if nginx_site_port is defined %}
{% include "./{}:{}.conf.j2".format(nginx_site_name, nginx_site_port) ignore missing %}
{% else %}
{% include "./{}.conf.j2".format(nginx_site_name) ignore missing %}
{% endif %}
{% if nginx_site_redirect is defined %}
return 301 {{ nginx_site_redirect }};
{% elif nginx_site_proxy is defined %}