php-fpm: Add config file examples and templates
This commit is contained in:
parent
166f27b947
commit
032622a4dc
|
@ -22,6 +22,8 @@ Alias {urlPath} "{documentRoot}"
|
||||||
Options SymLinksIfOwnerMatch
|
Options SymLinksIfOwnerMatch
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
|
||||||
<IfModule mod_authz_core.c>
|
<IfModule mod_authz_core.c>
|
||||||
# Apache 2.4
|
# Apache 2.4
|
||||||
<RequireAll>
|
<RequireAll>
|
||||||
|
@ -53,6 +55,13 @@ Alias {urlPath} "{documentRoot}"
|
||||||
DirectoryIndex error_norewrite.html
|
DirectoryIndex error_norewrite.html
|
||||||
ErrorDocument 404 /error_norewrite.html
|
ErrorDocument 404 /error_norewrite.html
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
# forwarding PHP requests to FPM
|
||||||
|
# remove comments if you want to use FPM
|
||||||
|
#<FilesMatch "\.php$">
|
||||||
|
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
|
# ErrorDocument 503 /icingaweb2/error_unavailable.html
|
||||||
|
#</FilesMatch>
|
||||||
</Directory>
|
</Directory>
|
||||||
EOD;
|
EOD;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
||||||
Options SymLinksIfOwnerMatch
|
Options SymLinksIfOwnerMatch
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
|
||||||
<IfModule mod_authz_core.c>
|
<IfModule mod_authz_core.c>
|
||||||
# Apache 2.4
|
# Apache 2.4
|
||||||
<RequireAll>
|
<RequireAll>
|
||||||
|
@ -35,4 +37,11 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
||||||
DirectoryIndex error_norewrite.html
|
DirectoryIndex error_norewrite.html
|
||||||
ErrorDocument 404 /error_norewrite.html
|
ErrorDocument 404 /error_norewrite.html
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
# forwarding PHP requests to FPM
|
||||||
|
# remove comments if you want to use FPM
|
||||||
|
#<FilesMatch "\.php$">
|
||||||
|
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
|
# ErrorDocument 503 /icingaweb2/error_unavailable.html
|
||||||
|
#</FilesMatch>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
||||||
|
|
||||||
|
# forwarding PHP requests to FPM
|
||||||
|
<LocationMatch "^/icingaweb2/(.*\.php)$">
|
||||||
|
ProxyPassMatch "fcgi://127.0.0.1:9000/usr/share/icingaweb2/public/$1"
|
||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
# Apache 2.4
|
||||||
|
ProxyErrorOverride on
|
||||||
|
ErrorDocument 503 /icingaweb2/error_unavailable.html
|
||||||
|
</IfModule>
|
||||||
|
</LocationMatch>
|
||||||
|
|
||||||
|
<Directory "/usr/share/icingaweb2/public">
|
||||||
|
Options SymLinksIfOwnerMatch
|
||||||
|
AllowOverride None
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
|
||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
# Apache 2.4
|
||||||
|
<RequireAll>
|
||||||
|
Require all granted
|
||||||
|
</RequireAll>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
# Apache 2.2
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
|
||||||
|
|
||||||
|
EnableSendfile Off
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteBase /icingaweb2/
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^.*$ - [NC,L]
|
||||||
|
RewriteRule ^.*$ index.php [NC,L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule !mod_rewrite.c>
|
||||||
|
DirectoryIndex error_norewrite.html
|
||||||
|
ErrorDocument 404 /error_norewrite.html
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# forwarding PHP requests to FPM
|
||||||
|
<FilesMatch "\.php$">
|
||||||
|
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
|
ErrorDocument 503 /icingaweb2/error_unavailable.html
|
||||||
|
</FilesMatch>
|
||||||
|
</Directory>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<h1>Backend unavailable</h1>
|
||||||
|
<p>
|
||||||
|
It seems that the PHP FPM service is not running. Make sure to start PHP FPM service in order to access Icinga Web 2.
|
||||||
|
If you upgraded Icinga Web 2 recently, make sure to read the
|
||||||
|
<a href="https://www.icinga.com/docs/icingaweb2/latest/doc/02-Installation/">docs regarding PHP FPM</a>,
|
||||||
|
also locally available under <code>/usr/share/icingaweb2/doc/02-Installation.md</code>.
|
||||||
|
</p>
|
Loading…
Reference in New Issue