add support for location
This commit is contained in:
parent
cd6fac6570
commit
ef2bb3320a
|
@ -11,6 +11,7 @@
|
|||
with_items:
|
||||
- /srv/http/.well-known/acme-challenge
|
||||
- /etc/nginx/sites.d
|
||||
- /etc/nginx/local.d
|
||||
- /etc/nginx/snippets
|
||||
|
||||
- name: templates
|
||||
|
@ -48,12 +49,18 @@
|
|||
line: "{{ inventory_hostname }}"
|
||||
create: yes
|
||||
|
||||
- name: templates
|
||||
- name: templates tls
|
||||
notify: reload nginx
|
||||
template:
|
||||
src: "10-tls.nginx"
|
||||
dest: "/etc/nginx/sites.d/10-tls.act"
|
||||
|
||||
- name: templates local.d
|
||||
notify: reload nginx
|
||||
template:
|
||||
src: "10-tls.local.nginx"
|
||||
dest: "/etc/nginx/local.d/10-tls.act"
|
||||
|
||||
- name: enabled dehydrated
|
||||
systemd:
|
||||
name: dehydrated.timer
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
|
@ -7,15 +7,7 @@ server {
|
|||
ssl_certificate /etc/dehydrated/certs/{{ inventory_hostname }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/dehydrated/certs/{{ inventory_hostname }}/privkey.pem;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
include /etc/nginx/local.d/*.act;
|
||||
|
||||
include snippets/letsencrypt.conf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue