nginx: Aktualisiere Rolle. Dient nun zur allgemeinen Einrichtung von Nginx
This commit is contained in:
commit
c9ed568d78
8 changed files with 92 additions and 0 deletions
15
templates/local-statistics.j2
Normal file
15
templates/local-statistics.j2
Normal file
|
@ -0,0 +1,15 @@
|
|||
server {
|
||||
{% if inventory_hostname == "sl-nextcloud.kahlo" %}
|
||||
listen 127.0.0.1:81;
|
||||
{% else %}
|
||||
listen 127.0.0.1;
|
||||
{% endif %}
|
||||
server_name localhost;
|
||||
location /nginx_status {
|
||||
stub_status on;
|
||||
access_log off;
|
||||
allow 127.0.0.0/8;
|
||||
allow ::1/128;
|
||||
deny all;
|
||||
}
|
||||
}
|
8
templates/monit.j2
Normal file
8
templates/monit.j2
Normal file
|
@ -0,0 +1,8 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
check process nginx with pidfile /var/run/nginx.pid
|
||||
group webserver
|
||||
start program = "/usr/sbin/service nginx start"
|
||||
stop program = "/usr/sbin/service nginx stop"
|
||||
if failed host 127.0.0.1 port {{ nginx_port |default(80) }} for 3 cycles then restart
|
||||
if 5 restarts with 5 cycles then timeout
|
Loading…
Add table
Add a link
Reference in a new issue