9 Distribution-specific notes on setting up Nginx for Zabbix

RHEL

On RHEL 8, 9, and 10, Nginx is included in AppStream—no extra repos needed. Simply enable and install with:

dnf module list nginx
       dnf -y install nginx

On RHEL 7, Nginx can be installed from the CentOS 7 Extras repository (if using CentOS) via:

yum -y install nginx

If you prefer the very latest upstream builds, configure the official NGINX repository at /etc/yum.repos.d/nginx.repo:

cat > /etc/yum.repos.d/nginx.repo << 'EOF'
       [nginx-stable]
       name=nginx stable repo
       baseurl=https://nginx.org/packages/rhel/$releasever/$basearch/
       gpgcheck=1
       enabled=1
       gpgkey=https://nginx.org/keys/nginx_signing.key
       EOF
       dnf -y install nginx

SLES 15

In SUSE Linux Enterprise Server 15 you need to configure php-fpm (the path to configuration file may vary slightly depending on the service pack):

cp /etc/php8/fpm/php-fpm.conf{.default,}
       cp /etc/php8/fpm/php-fpm.d/www.conf{.default,}
       sed -i 's/user = nobody/user = wwwrun/; s/group = nobody/group = www/' /etc/php8/fpm/php-fpm.d/www.conf