nginx_site: Allow to run site in custom port
This commit is contained in:
parent
72736c8b13
commit
fd69bcdec0
2 changed files with 8 additions and 3 deletions
|
@ -10,7 +10,12 @@
|
|||
|
||||
- name: "Create site config for {{ nginx_site_name }}"
|
||||
ansible.builtin.template:
|
||||
dest: /etc/nginx/conf.d/{{ nginx_site_name }}.conf
|
||||
dest: >-
|
||||
/etc/nginx/conf.d/{{ nginx_site_name }}{%
|
||||
if nginx_site_port is defined
|
||||
%}:{{nginx_site_port }}{%
|
||||
endif
|
||||
%}.conf
|
||||
src: site.conf.j2
|
||||
mode: "0644"
|
||||
owner: root
|
||||
|
|
|
@ -14,8 +14,8 @@ upstream {{ nginx_site_name }} {
|
|||
}
|
||||
{% endif %}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
listen {{ nginx_site_port | default('443') }} ssl;
|
||||
listen [::]:{{ nginx_site_port | default('443') }} ssl;
|
||||
http2 on;
|
||||
http3 off;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue