Uses standard Nginx available-enabled conf files
This commit is contained in:
parent
dc40c11fbe
commit
8ceed3d540
@ -7,6 +7,12 @@
|
|||||||
- name: Create basic Nginx config for new container
|
- name: Create basic Nginx config for new container
|
||||||
template:
|
template:
|
||||||
src: newsite.conf.j2
|
src: newsite.conf.j2
|
||||||
|
dest: '/etc/nginx/sites-available/{{ container }}.{{ dominio }}'
|
||||||
|
|
||||||
|
- name: Enable Nginx config for new container
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
src: '/etc/nginx/sites-available/{{ container }}.{{ dominio }}'
|
||||||
dest: '/etc/nginx/sites-enabled/{{ container }}.{{ dominio }}'
|
dest: '/etc/nginx/sites-enabled/{{ container }}.{{ dominio }}'
|
||||||
|
|
||||||
- name: Create folder for Let's Encrypt files
|
- name: Create folder for Let's Encrypt files
|
||||||
@ -31,13 +37,13 @@
|
|||||||
|
|
||||||
- name: Use Proxy protocol in port 443
|
- name: Use Proxy protocol in port 443
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: '/etc/nginx/sites-enabled/{{ container }}.{{ dominio }}'
|
path: '/etc/nginx/sites-available/{{ container }}.{{ dominio }}'
|
||||||
line: ' listen 443 ssl proxy_protocol;'
|
line: ' listen 443 ssl proxy_protocol;'
|
||||||
regexp: '^ listen 443'
|
regexp: '^ listen 443'
|
||||||
|
|
||||||
- name: Use Proxy protocol in port 443 IPv6
|
- name: Use Proxy protocol in port 443 IPv6
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: '/etc/nginx/sites-enabled/{{ container }}.{{ dominio }}'
|
path: '/etc/nginx/sites-available/{{ container }}.{{ dominio }}'
|
||||||
line: ' listen [::]:443 ssl proxy_protocol;'
|
line: ' listen [::]:443 ssl proxy_protocol;'
|
||||||
regexp: '^ listen .....443'
|
regexp: '^ listen .....443'
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user