Web Server - antonizoon/home-server GitHub Wiki
Apache
Nginx
CentOS 7
- HTML Directory -
/usr/share/nginx/html
- Nginx Configuration -
/etc/nginx/nginx.conf
First, enable the EPEL repository:
sudo yum install epel-release
Next, install Nginx.
sudo yum install nginx
Finally, start nginx.
sudo systemctl start nginx
If you have a firewall active (which you should), enable HTTP and HTTPS access. Here's how for FirewallD:
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7