On RHEL 8, 9, and 10, Nginx is included in AppStream—no extra repos needed. Simply enable and install with:
On RHEL 7, Nginx can be installed from the CentOS 7 Extras repository (if using CentOS) via:
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 nginxIn SUSE Linux Enterprise Server 15 you need to configure php-fpm (the path to configuration file may vary slightly depending on the service pack):