roles/nginx/static added
parent
309d23ba8a
commit
bdf96b6eeb
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
# domain: example.com
|
||||
root_directory: "{{ global_webservers_directory }}/{{ domain }}"
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
allow_duplicates: yes
|
||||
|
||||
dependencies:
|
||||
- role: acme/certificate
|
||||
- role: nginx/application
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Configure static for {{ domain }}
|
||||
template:
|
||||
src: static.conf
|
||||
dest: "{{ nginx_sites_directory }}/{{ domain }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "u=rw,g=r,o=r"
|
||||
notify: reload nginx
|
@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name {{ domain }};
|
||||
|
||||
ssl on;
|
||||
ssl_certificate {{ acme_certificate_location }};
|
||||
ssl_certificate_key {{ acme_key_location }};
|
||||
|
||||
root {{ root_directory }};
|
||||
|
||||
include {{ nginx_snippets_directory }}/https;
|
||||
include {{ nginx_snippets_directory }}/root;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue