diff --git a/Bundler/nginx.xml b/Bundler/nginx.xml index de78610..4247a7b 100644 --- a/Bundler/nginx.xml +++ b/Bundler/nginx.xml @@ -1,7 +1,7 @@ - + diff --git a/Bundler/php.xml b/Bundler/php.xml index 3a13839..17d1d15 100644 --- a/Bundler/php.xml +++ b/Bundler/php.xml @@ -1,6 +1,8 @@ + + diff --git a/Cfg/etc/nginx/sites-available/status/info.xml b/Cfg/etc/nginx/sites-available/status/info.xml deleted file mode 100644 index 28fd470..0000000 --- a/Cfg/etc/nginx/sites-available/status/info.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Cfg/etc/nginx/sites-available/status/status b/Cfg/etc/nginx/sites-available/status/status deleted file mode 100644 index 5a1a7e0..0000000 --- a/Cfg/etc/nginx/sites-available/status/status +++ /dev/null @@ -1,10 +0,0 @@ -server { - listen 127.0.0.1; - server_name localhost; - location /nginx_status { - stub_status on; - access_log off; - allow 127.0.0.1; - deny all; - } -} diff --git a/Cfg/etc/nginx/snippets/php.conf/php.conf b/Cfg/etc/nginx/snippets/php.conf/php.conf index 8df5602..f316fa5 100644 --- a/Cfg/etc/nginx/snippets/php.conf/php.conf +++ b/Cfg/etc/nginx/snippets/php.conf/php.conf @@ -14,3 +14,13 @@ location ~ .+\.php { include fastcgi_params; } +location ~ ^/php_(ping|status)$ { + access_log off; + allow 127.0.0.1; + deny all; + root /usr/share/nginx/html; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name; + include fastcgi_params; +} + diff --git a/Metadata/clients.xml b/Metadata/clients.xml index 074059d..86a63ce 100644 --- a/Metadata/clients.xml +++ b/Metadata/clients.xml @@ -47,7 +47,7 @@ - + diff --git a/Metadata/groups.xml b/Metadata/groups.xml index a0f51f1..d083808 100644 --- a/Metadata/groups.xml +++ b/Metadata/groups.xml @@ -53,6 +53,7 @@ + diff --git a/Python/etc/monit/services b/Python/etc/monit/services index a6655c4..73079e3 100644 --- a/Python/etc/monit/services +++ b/Python/etc/monit/services @@ -52,14 +52,14 @@ service("apache", service('nginx') -service('sogo', pidf="sogo/sogo") +service('sogo', pidf="sogo/sogo", extra=['if failed host localhost port 20000 protocol http timeout 20 seconds for 5 cycles then restart']) service('ejabberd', pidf='ejabberd/ejabberd') if has('nginx'): if has('php'): - service(name='php5-fpm') + service(name='php5-fpm', extra=["if failed host localhost port 80 protocol http and request '/php_ping' timeout 20 seconds for 5 cycles then restart"]) if has('cgi'): service(name='fcgiwrap', pidp='/var/run/fcgiwrap.pids') diff --git a/Python/etc/nginx/sites-available/status b/Python/etc/nginx/sites-available/status new file mode 100644 index 0000000..a921089 --- /dev/null +++ b/Python/etc/nginx/sites-available/status @@ -0,0 +1,20 @@ +# -*- mode: python; encoding: utf-8 -*- + +info["owner"] = "root" +info["group"] = "root" +info["perms"] = 0644 + +comment_start = "#" + +print """server { + listen 127.0.0.1; + server_name localhost; + location /nginx_status { + stub_status on; + access_log off; + allow 127.0.0.1; + deny all; + }""" +if has("php"): + print ' include "snippets/php.conf";' +print "}" diff --git a/Rules/php.xml b/Rules/php.xml new file mode 100644 index 0000000..53e94e7 --- /dev/null +++ b/Rules/php.xml @@ -0,0 +1,9 @@ + + + + + + +