Basic Apache Installation and PHP - Foren-Ken/tech-journal GitHub Wiki

Requirements for a CentOS webserver:

Package Use
httpd This installs the required packages and items for a basic http webserver
php Allows the use of the php language for the webserver

Setting up the webserver:

Using firewall-cmd add port 80 for http traffic:
firewall-cmd --permanant --add-port=80/tcp
firewall-cmd --reload

To check the firwewall configuration:
firewall-cmd --list-all

To start and enable the service, the following command can be used:
systemctl start httpd
systemctl enable httpd

The root of the webserver is located at: /var/www/html

If PHP was added after httpd was started, remember to restart the httpd service.