Sunday, December 31, 2017

How to Install & Configure Apache Webserver on CentOS 7



Install Apache Webserver on CentOS7




sudo yum -y install httpd

Allow Apache Through the Firewall

  1. Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:

sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcpcanent --add-port=443/tcp
  1. And reload the firewall:

    sudo f
sudo firewall-cmd --reloadcmd --reload

Configure Apache to Start on Boot


            sudo systemctl start httpd
sudo systemctl enable httpd

You can check the status using the command


                sudo systemctl status httpd

No comments:

Post a Comment