Add nginx-extra role
This commit is contained in:
parent
6aa994b056
commit
2e5de83a17
5 changed files with 23 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
- hosts: nginx
|
||||
roles:
|
||||
- nginx
|
||||
- nginx-extra
|
||||
- error-pages
|
||||
tags: nginx
|
||||
|
||||
|
|
3
roles/nginx-extra/files/snippets/autoindex.conf
Normal file
3
roles/nginx-extra/files/snippets/autoindex.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
autoindex on;
|
||||
autoindex_exact_size on;
|
||||
autoindex_localtime off;
|
|
@ -0,0 +1,6 @@
|
|||
location ^~ /.well-known/acme-challenge {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://srv01.hamburg.freifunk.net$request_uri;
|
||||
access_log off;
|
||||
}
|
8
roles/nginx-extra/files/snippets/no-unsafe-files.conf
Normal file
8
roles/nginx-extra/files/snippets/no-unsafe-files.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
disable_symlinks if_not_owner from=$document_root;
|
||||
|
||||
# Do not serve dotfiles.
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
5
roles/nginx-extra/tasks/main.yml
Normal file
5
roles/nginx-extra/tasks/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: copy snippets
|
||||
copy:
|
||||
src: snippets/
|
||||
dest: /etc/nginx/snippets/
|
Loading…
Reference in a new issue