diff --git a/templates/etc/nginx/sites-available/zabbix_check.j2 b/templates/etc/nginx/sites-available/zabbix_check.j2 index 0efc4c2..45641cd 100644 --- a/templates/etc/nginx/sites-available/zabbix_check.j2 +++ b/templates/etc/nginx/sites-available/zabbix_check.j2 @@ -1,10 +1,23 @@ server { - listen 10061; + listen {{ item.port }}; - location /nginx_status { - stub_status on; + location /basic_status { + stub_status; access_log off; allow 127.0.0.1; deny all; } +{% if item.php_check defined and item.php_check == 'true' %} + location ~ ^/(status|ping)$ { + access_log off; + allow 127.0.0.1; + deny all; + + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_pass unix:{{ pool_listen }}; + } +{% endif %} + }