@@ -33,6 +35,13 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
DirectoryIndex error_norewrite.html
- ErrorDocument 404 /error_norewrite.html
+ ErrorDocument 404 /icingaweb2/error_norewrite.html
+
+ # forwarding PHP requests to FPM
+ # remove comments if you want to use FPM
+ #
+ # SetHandler "proxy:fcgi://127.0.0.1:9000"
+ # ErrorDocument 503 /icingaweb2/error_unavailable.html
+ #
diff --git a/packages/files/apache/icingaweb2.fpm.conf b/packages/files/apache/icingaweb2.fpm.conf
new file mode 100644
index 000000000..defdf2bbb
--- /dev/null
+++ b/packages/files/apache/icingaweb2.fpm.conf
@@ -0,0 +1,56 @@
+Alias /icingaweb2 "/usr/share/icingaweb2/public"
+
+# forwarding PHP requests to FPM
+
+ ProxyPassMatch "fcgi://127.0.0.1:9000/usr/share/icingaweb2/public/$1"
+
+ # Apache 2.4
+ ProxyErrorOverride on
+ ErrorDocument 503 /icingaweb2/error_unavailable.html
+
+
+
+
+ Options SymLinksIfOwnerMatch
+ AllowOverride None
+
+ DirectoryIndex index.php
+
+
+ # Apache 2.4
+
+ Require all granted
+
+
+
+
+ # Apache 2.2
+ Order allow,deny
+ Allow from all
+
+
+ SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
+
+ EnableSendfile Off
+
+
+ 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]
+
+
+
+ DirectoryIndex error_norewrite.html
+ ErrorDocument 404 /icingaweb2/error_norewrite.html
+
+
+ # forwarding PHP requests to FPM
+
+ SetHandler "proxy:fcgi://127.0.0.1:9000"
+ ErrorDocument 503 /icingaweb2/error_unavailable.html
+
+
diff --git a/public/error_unavailable.html b/public/error_unavailable.html
new file mode 100644
index 000000000..d1ef413df
--- /dev/null
+++ b/public/error_unavailable.html
@@ -0,0 +1,7 @@
+Backend unavailable
+
+ 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
+ docs regarding PHP FPM,
+ also locally available under /usr/share/icingaweb2/doc/02-Installation.md
.
+