diff --git a/doc/02-Installation.md b/doc/02-Installation.md index 7231c5c2e..94d5f004a 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -14,7 +14,7 @@ chapter. * [Icinga 2](https://www.icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL) * A web server, e.g. Apache or Nginx -* PHP >= 5.3.0 with the following modules installed: cURL, gettext, intl, mbstring, OpenSSL and xml +* PHP >= 5.3.2 with the following modules installed: cURL, gettext, intl, mbstring, OpenSSL and xml * Default time zone configured for PHP in the php.ini file * LDAP PHP library when using Active Directory or LDAP for authentication * MySQL or PostgreSQL PHP libraries @@ -75,12 +75,6 @@ yum install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch. dnf install https://packages.icinga.com/fedora/icinga-rpm-release-26-latest.noarch.rpm ``` -**SLES 11**: -``` -zypper ar http://packages.icinga.com/SUSE/ICINGA-release-11.repo -zypper ref -``` - **SLES 12**: ``` zypper ar http://packages.icinga.com/SUSE/ICINGA-release.repo @@ -104,17 +98,46 @@ apk update #### RHEL/CentOS Notes -The packages for RHEL/CentOS depend on other packages which are distributed -as part of the [EPEL repository](https://fedoraproject.org/wiki/EPEL). +Our packages are build on and with packages from the **[EPEL repository](https://fedoraproject.org/wiki/EPEL)**. +Please enable it prior installing the Icinga packages. CentOS 7/6: ``` yum install epel-release ``` -If you are using RHEL you need enable the `optional` repository and then install -the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F). +RedHat 7: +``` +yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +``` +If you are using RHEL you need enable the **optional repository** in order to use some +contents of EPEL. + +RedHat: +``` +subscription-manager repos --enable rhel-7-server-optional-rpms +# or +subscription-manager repos --enable rhel-6-server-optional-rpms +``` + +Since version 2.5.0 we also require a **newer PHP version** than what is available +in RedHat itself. You need to enable the SCL repository, so that the dependencies +can pull in the newer PHP. + +CentOS: +``` +yum install centos-release-scl +``` + +RedHat: +``` +subscription-manager repos --enable rhel-server-rhscl-7-rpms +# or +subscription-manager repos --enable rhel-server-rhscl-6-rpms +``` + +Make sure to also read the chapter on [Setting up FPM](02-Installation.md#setting-up-fpm). #### Alpine Linux Notes @@ -152,6 +175,145 @@ apk add icingaweb2 ``` For Alpine Linux please read the [package repositories notes](02-Installation.md#package-repositories-alpine-notes). +### Setting up FPM + +If you are on CentOS / RedHat 6 or 7, or just want to run Icinga Web 2 with PHP-FPM instead +of the Apache module. + +| Operating System | FPM configuration path | +|---------------------|-----------------------------------| +| RedHat 7 (with SCL) | `/etc/opt/rh/rh-php71/php-fpm.d/` | +| RedHat 6 (with SCL) | `/etc/opt/rh/rh-php70/php-fpm.d/` | +| Debian/Ubuntu | `/etc/php*/*/fpm/pool.d/` | + +The default pool `www` should be sufficient for Icinga Web 2. + +On RedHat you need to start and enable the FPM service. + +RedHat / CentOS 7 (SCL package): +``` +systemctl start rh-php71-php-fpm.service +systemctl enable rh-php71-php-fpm.service +``` + +RedHat / CentOS 6 (SCL package): +``` +service rh-php70-php-fpm start +chkconfig rh-php70-php-fpm on +``` + +All module packages for PHP have this SCL prefix, so you can install a +database module like this: +``` +yum install rh-php71-php-mysqlnd +# or +yum install rh-php71-php-pgsql + +# on el6 +yum install rh-php70-php-mysqlnd +# or +yum install rh-php70-php-pgsql +``` + +On RedHat / CentOS 6 you also need to install `mod_proxy_fcgi` for httpd: +``` +yum install mod_proxy_fcgi +``` + +Depending on your web server installation, we might have installed or +updated the config file for icingaweb2 with defaults for FPM. + +Check `/etc/httpd/conf.d/icingaweb2.conf` or `/etc/apache2/conf.d/icingaweb2.conf`. +And `*.rpm*` `*.dpkg*` files there with updates. + +Make sure that the `FilesMatch` part is included for Apache. + +Also see the example from icingacli: +``` +icingacli setup config webserver apache +``` + +### Upgrading to FPM + +Valid for: + +* RedHat / CentOS 6 +* RedHat / CentOS 7 + +Other distributions are also possible if preferred, but not included here. + +Some upgrading work needs to be done manually, while we install PHP FPM +as dependency, you need to start the service, and configure some things. + +Please read [Setting up FPM](02-Installation.md#setting-up-fpm) first. + +**php.ini settings** you have tuned in the past needs to be migrated to a SCL installation +of PHP. + +Check these directories: + +* `/etc/php.ini` +* `/etc/php.d/*.ini` + +Most important for icingaweb2 is `date.timezone`. + +PHP settings should be stored to: + +* RedHat / CentOS 7: `/etc/opt/rh/rh-php71/php.d/` +* RedHat / CentOS 6: `/etc/opt/rh/rh-php70/php.d/` + +Make sure to **install the required database modules** + +RedHat / CentOS 7: +``` +yum install rh-php71-php-mysqlnd +# or +yum install rh-php71-php-pgsql +``` + +RedHat / CentOS 6: +``` +yum install rh-php70-php-mysqlnd +# or +yum install rh-php70-php-pgsql +``` + +After any PHP related change you now need to **restart FPM**: + +RedHat / CentOS 7: +``` +systemctl restart rh-php71-php-fpm.service +``` + +RedHat / CentOS 6: +``` +service rh-php70-php-fpm restart +``` + +If you don't need mod_php for other apps on the server, you should disable it in Apache. + +Disable PHP in Apache httpd: +``` +cd /etc/httpd +cp conf.d/php.conf{,.bak} +: >conf.d/php.conf + +# ONLY on el7! +cp conf.modules.d/10-php.conf{,.bak} +: >conf.modules.d/10-php.conf + +systemctl restart httpd.service +# or on el6 +service httpd restart +``` + +You can also uninstall the mod_php package, or all non-SCL PHP related packages. +``` +yum remove php +# or +yum remove php-common +``` + ### Preparing Web Setup You can set up Icinga Web 2 quickly and easily with the Icinga Web 2 setup wizard which is available the first time diff --git a/doc/80-Upgrading.md b/doc/80-Upgrading.md index 4838f6743..f9e2c9836 100644 --- a/doc/80-Upgrading.md +++ b/doc/80-Upgrading.md @@ -1,5 +1,35 @@ # Upgrading Icinga Web 2 +## Upgrading to Icinga Web 2 2.5.x + +**Attention:** Icinga Web 2 now requires **at least PHP 5.6** + +**Changes in packaging and dependencies** + +Valid for distributions: + +* RHEL / CentOS 6 + 7 + * Upgrading to PHP 7.0 / 7.1 via RedHat SCL (new dependency) + * See [Upgrading to FPM](02-Installation.md#upgrading-to-fpm) for manual steps that + are required +* SUSE SLE 12 + * Upgrading PHP to >= 5.6.0 via the alternative packages. + You might have to confirm the replacement of PHP < 5.6 - but that + should work with any other PHP app as well. + * Make sure to enable the new Apache module `a2enmod php7` and restart `apache2` + +**Discontinuing package updates** + +For the following distributions Icinga Web 2 won't be updated past 2.4.x anymore. + +* Debian 7 wheezy +* Ubuntu 14.04 LTS (trusty) +* SUSE SLE 11 (all service packs) + +Please think about replacing your central Icinga system to a newer distribution release. + +Also see [packages.icinga.com] for the currently supported distributions. + ## Upgrading to Icinga Web 2 2.4.x * Icinga Web 2 version 2.4.x does not introduce any backward incompatible change. @@ -82,3 +112,5 @@ If you delegated authentication to your web server using the `autologin` backend authentication backend to be able to log in again. The new name better reflects what's going on. A similar change affects environments that opted for not storing preferences, your new backend is `none`. + +[packages.icinga.com]: https://packages.icinga.com diff --git a/icingaweb2.spec b/icingaweb2.spec deleted file mode 100644 index fed584f90..000000000 --- a/icingaweb2.spec +++ /dev/null @@ -1,355 +0,0 @@ -# Icinga Web 2 | (c) 2013-2016 Icinga Development Team | GPLv2+ - -%define revision 1 - -Name: icingaweb2 -Version: 2.4.1 -Release: %{revision}%{?dist} -Summary: Icinga Web 2 -Group: Applications/System -License: GPLv2+ and MIT and BSD -URL: https://icinga.com -Source0: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz -BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -Packager: Icinga Team - -%if 0%{?fedora} || 0%{?rhel} || 0%{?amzn} -%define php php -%define php_cli php-cli -%define wwwconfigdir %{_sysconfdir}/httpd/conf.d -%define wwwuser apache -%endif - -%if 0%{?suse_version} -%define wwwconfigdir %{_sysconfdir}/apache2/conf.d -%define wwwuser wwwrun -%if 0%{?suse_version} == 1110 -%define php php53 -Requires: apache2-mod_php53 -%else -%define php php5 -Requires: apache2-mod_php5 -%endif -%endif - -%{?amzn:Requires(pre): shadow-utils} -%{?fedora:Requires(pre): shadow-utils} -%{?rhel:Requires(pre): shadow-utils} -%{?suse_version:Requires(pre): pwdutils} -Requires: %{name}-common = %{version}-%{release} -Requires: php-Icinga = %{version}-%{release} -Requires: %{name}-vendor-dompdf = 0.7.0-1%{?dist} -Requires: %{name}-vendor-HTMLPurifier = 4.8.0-1%{?dist} -Requires: %{name}-vendor-JShrink = 1.1.0-1%{?dist} -Requires: %{name}-vendor-lessphp = 0.4.0-1%{?dist} -Requires: %{name}-vendor-Parsedown = 1.6.0-1%{?dist} - -%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6") -%define selinux 1 -%define selinux_variants mls targeted -%{!?_selinux_policy_version: %define _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)} -%endif - -%define basedir %{_datadir}/%{name} -%define bindir %{_bindir} -%define configdir %{_sysconfdir}/%{name} -%define logdir %{_localstatedir}/log/%{name} -%define phpdir %{_datadir}/php -%define icingawebgroup icingaweb2 -%define docsdir %{_datadir}/doc/%{name} - - -%description -Icinga Web 2 - - -%package common -Summary: Common files for Icinga Web 2 and the Icinga CLI -Group: Applications/System -%{?amzn:Requires(pre): shadow-utils} -%{?fedora:Requires(pre): shadow-utils} -%{?rhel:Requires(pre): shadow-utils} -%{?suse_version:Requires(pre): pwdutils} - -%description common -Common files for Icinga Web 2 and the Icinga CLI - - -%package -n php-Icinga -Summary: Icinga Web 2 PHP library -Group: Development/Libraries -Requires: %{php} >= 5.3.0 -Requires: %{php}-gd %{php}-intl -Requires: %{name}-vendor-zf1 = 1.12.20-1%{?dist} -%{?amzn:Requires: %{php}-pecl-imagick} -%{?fedora:Requires: php-pecl-imagick} -%{?rhel:Requires: php-pecl-imagick} -%{?suse_version:Requires: %{php}-gettext %{php}-json %{php}-openssl %{php}-posix} - -%description -n php-Icinga -Icinga Web 2 PHP library - - -%package -n icingacli -Summary: Icinga CLI -Group: Applications/System -Requires: %{name}-common = %{version}-%{release} -Requires: php-Icinga = %{version}-%{release} -%{?amzn:Requires: %{php_cli} >= 5.3.0 bash-completion} -%{?fedora:Requires: %{php_cli} >= 5.3.0 bash-completion} -%{?rhel:Requires: %{php_cli} >= 5.3.0 bash-completion} -%{?suse_version:Requires: %{php} >= 5.3.0} - -%description -n icingacli -Icinga CLI - - -%if 0%{?selinux} -%package selinux -Summary: SELinux policy for Icinga Web 2 -BuildRequires: checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp, hardlink -%if "%{_selinux_policy_version}" != "" -Requires: selinux-policy >= %{_selinux_policy_version} -%endif -Requires: %{name} = %{version}-%{release} -Requires(post): policycoreutils -Requires(postun): policycoreutils - -%description selinux -SELinux policy for Icinga Web 2 -%endif - - -%package vendor-dompdf -Version: 0.7.0 -Release: 1%{?dist} -Summary: Icinga Web 2 vendor library dompdf -Group: Development/Libraries -License: LGPLv2.1 -Requires: %{php} >= 5.3.0 - -%description vendor-dompdf -Icinga Web 2 vendor library dompdf - - -%package vendor-HTMLPurifier -Version: 4.8.0 -Release: 1%{?dist} -Summary: Icinga Web 2 vendor library HTMLPurifier -Group: Development/Libraries -License: LGPLv2.1 -Requires: %{php} >= 5.3.0 - -%description vendor-HTMLPurifier -Icinga Web 2 vendor library HTMLPurifier - - -%package vendor-JShrink -Version: 1.1.0 -Release: 1%{?dist} -Summary: Icinga Web 2 vendor library JShrink -Group: Development/Libraries -License: BSD -Requires: %{php} >= 5.3.0 - -%description vendor-JShrink -Icinga Web 2 vendor library JShrink - - -%package vendor-lessphp -Version: 0.4.0 -Release: 1%{?dist} -Summary: Icinga Web 2 vendor library lessphp -Group: Development/Libraries -License: MIT -Requires: %{php} >= 5.3.0 - -%description vendor-lessphp -Icinga Web 2 vendor library lessphp - - -%package vendor-Parsedown -Version: 1.6.0 -Release: 1%{?dist} -Summary: Icinga Web 2 vendor library Parsedown -Group: Development/Libraries -License: MIT -Requires: %{php} >= 5.3.0 - -%description vendor-Parsedown -Icinga Web 2 vendor library Parsedown - - -%package vendor-zf1 -Version: 1.12.20 -Release: 1%{?dist} -Summary: Icinga Web 2's fork of Zend Framework 1 -Group: Development/Libraries -License: BSD -Requires: %{php} >= 5.3.0 -Obsoletes: %{name}-vendor-Zend - -%description vendor-zf1 -Icinga Web 2's fork of Zend Framework 1 - - -%prep -%setup -q -%if 0%{?selinux} -mkdir selinux -cp -p packages/selinux/icingaweb2.{fc,if,te} selinux -%endif - -%build -%if 0%{?selinux} -cd selinux -for selinuxvariant in %{selinux_variants} -do - make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile - mv icingaweb2.pp icingaweb2.pp.${selinuxvariant} - make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean -done -cd - -%endif - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}/{%{basedir}/{modules,library/vendor,public},%{bindir},%{configdir}/modules,%{logdir},%{phpdir},%{wwwconfigdir},%{_sysconfdir}/bash_completion.d,%{docsdir}} -cp -prv application doc %{buildroot}/%{basedir} -cp -pv etc/bash_completion.d/icingacli %{buildroot}/%{_sysconfdir}/bash_completion.d/icingacli -cp -prv modules/{monitoring,setup,doc,translation} %{buildroot}/%{basedir}/modules -cp -prv library/Icinga %{buildroot}/%{phpdir} -cp -prv library/vendor/{dompdf,HTMLPurifier*,JShrink,lessphp,Parsedown,Zend} %{buildroot}/%{basedir}/library/vendor -cp -prv public/{css,font,img,js,error_norewrite.html} %{buildroot}/%{basedir}/public -cp -pv packages/files/apache/icingaweb2.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf -cp -pv packages/files/bin/icingacli %{buildroot}/%{bindir} -cp -pv packages/files/public/index.php %{buildroot}/%{basedir}/public -cp -prv etc/schema %{buildroot}/%{docsdir} -cp -prv packages/files/config/modules/{setup,translation} %{buildroot}/%{configdir}/modules -%if 0%{?selinux} -cd selinux -for selinuxvariant in %{selinux_variants} -do - install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant} - install -p -m 644 icingaweb2.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/icingaweb2.pp -done -cd - -/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux -%endif - -%pre -getent group icingacmd >/dev/null || groupadd -r icingacmd -%if 0%{?suse_version} && 0%{?suse_version} < 01200 -usermod -A icingacmd,%{icingawebgroup} %{wwwuser} -%else -usermod -a -G icingacmd,%{icingawebgroup} %{wwwuser} -%endif -exit 0 - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root) -%{basedir}/application/controllers -%{basedir}/application/fonts -%{basedir}/application/forms -%{basedir}/application/layouts -%{basedir}/application/views -%{basedir}/application/VERSION -%{basedir}/doc -%{basedir}/modules -%{basedir}/public -%config(noreplace) %{wwwconfigdir}/icingaweb2.conf -%attr(2775,root,%{icingawebgroup}) %dir %{logdir} -%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules/setup -%attr(0660,root,%{icingawebgroup}) %config(noreplace) %{configdir}/modules/setup/config.ini -%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules/translation -%attr(0660,root,%{icingawebgroup}) %config(noreplace) %{configdir}/modules/translation/config.ini -%{docsdir} -%docdir %{docsdir} - - -%pre common -getent group %{icingawebgroup} >/dev/null || groupadd -r %{icingawebgroup} -exit 0 - -%files common -%defattr(-,root,root) -%{basedir}/application/locale -%dir %{basedir}/modules -%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir} -%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules - - -%files -n php-Icinga -%defattr(-,root,root) -%{phpdir}/Icinga - - -%files -n icingacli -%defattr(-,root,root) -%{basedir}/application/clicommands -%{_sysconfdir}/bash_completion.d/icingacli -%attr(0755,root,root) %{bindir}/icingacli - - -%if 0%{?selinux} -%post selinux -for selinuxvariant in %{selinux_variants} -do - %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/icingaweb2.pp &> /dev/null || : -done -%{_sbindir}/restorecon -R %{basedir} &> /dev/null || : -%{_sbindir}/restorecon -R %{configdir} &> /dev/null || : -%{_sbindir}/restorecon -R %{logdir} &> /dev/null || : - -%postun selinux -if [ $1 -eq 0 ] ; then - for selinuxvariant in %{selinux_variants} - do - %{_sbindir}/semodule -s ${selinuxvariant} -r icingaweb2 &> /dev/null || : - done - [ -d %{basedir} ] && %{_sbindir}/restorecon -R %{basedir} &> /dev/null || : - [ -d %{configdir} ] && %{_sbindir}/restorecon -R %{configdir} &> /dev/null || : - [ -d %{logdir} ] && %{_sbindir}/restorecon -R %{logdir} &> /dev/null || : -fi - -%files selinux -%defattr(-,root,root,0755) -%doc selinux/* -%{_datadir}/selinux/*/icingaweb2.pp -%endif - - -%files vendor-dompdf -%defattr(-,root,root) -%{basedir}/library/vendor/dompdf - - -%files vendor-HTMLPurifier -%defattr(-,root,root) -%{basedir}/library/vendor/HTMLPurifier -%{basedir}/library/vendor/HTMLPurifier.autoload.php -%{basedir}/library/vendor/HTMLPurifier.php - - -%files vendor-JShrink -%defattr(-,root,root) -%{basedir}/library/vendor/JShrink - - -%files vendor-lessphp -%defattr(-,root,root) -%{basedir}/library/vendor/lessphp - - -%files vendor-Parsedown -%defattr(-,root,root) -%{basedir}/library/vendor/Parsedown - - -%files vendor-zf1 -%defattr(-,root,root) -%{basedir}/library/vendor/Zend diff --git a/modules/setup/library/Setup/Webserver/Apache.php b/modules/setup/library/Setup/Webserver/Apache.php index e8c7d540c..369b65507 100644 --- a/modules/setup/library/Setup/Webserver/Apache.php +++ b/modules/setup/library/Setup/Webserver/Apache.php @@ -22,6 +22,8 @@ Alias {urlPath} "{documentRoot}" Options SymLinksIfOwnerMatch AllowOverride None + DirectoryIndex index.php + # Apache 2.4 @@ -51,8 +53,15 @@ Alias {urlPath} "{documentRoot}" DirectoryIndex error_norewrite.html - ErrorDocument 404 /error_norewrite.html + ErrorDocument 404 {urlPath}/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 {urlPath}/error_unavailable.html + # EOD; } diff --git a/packages/files/apache/icingaweb2.conf b/packages/files/apache/icingaweb2.conf index 6bf0b7a66..7225f840f 100644 --- a/packages/files/apache/icingaweb2.conf +++ b/packages/files/apache/icingaweb2.conf @@ -4,6 +4,8 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public" Options SymLinksIfOwnerMatch AllowOverride None + DirectoryIndex index.php + # Apache 2.4 @@ -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. +