Apache Install - natekreit/SYS-255 GitHub Wiki

Overview

Commands

Firewall

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --reload

Install httpd

sudo yum install httpd

sudo systemctl enable httpd

sudo systemctl start httpd

sudo systemctl status httpd

Change web server home page

remove welcome.conf

/etc/httpd/conf.d

sudo rm -i welcome.conf

Create index.html

cd /var/www/html

sudo echo "Welcome to my server!" > index.php

Install PHP

sudo yum install epel-release

sudo yum install php

php -v