Install Apache Webserver on CentOS7
sudo yum -y
install httpd
Allow Apache Through the Firewall
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
And reload the firewall:
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