• sudo dnf config-manager --add-repo "http://nginx.org/packages/$(. /etc/os-release;echo $ID)/$(rpm -E "%{$(. /etc/os-release;echo $ID)}/%{_arch}")" && echo 'gpgkey=https://nginx.org/keys/nginx_signing.key' | sudo tee -a /etc/yum.repos.d/nginx*.repo
  • sudo dnf install nginx
  • echo 'include /etc/nginx/sites-enabled/*;' | sudo tee /etc/nginx/conf.d/sites.conf
  • sudo mkdir -v /etc/nginx/sites-{enabled,available}
  • sudo systemctl enable --now nginx
  • sudo firewall-cmd --add-service=http --add-service=https --permanent

One thought on “Installing NGINX on CentOS 8

Leave a Reply

Your email address will not be published.

Warning: This site uses Akismet to filter spam. Until or unless I can find a suitable replacement anti-spam solution, this means that (per their indemnification document) all commenters' IP addresses will be sent to Automattic, Inc., who may choose to share such with 3rd parties.
If this is unacceptable to you, I highly recommend using an anonymous proxy or public Wi-Fi connection when commenting.