Step 1: Setup Apache Web Server
1.¬†Apache web server powers millions of websites across the web. It is very flexible in terms of customization and its security can be greatly improved with modules such as¬†mod_security and mod_evasive.
To install¬†Apache¬†in¬†Fedora 22¬†you can simply run the following command as root:
# dnf install httpd
Install Apache Web Server
2.¬†Once the install is complete you can power on Apache by issuing the following command:
# systemctl start httpd
Start Apache Web Server
3.¬†To verify that¬†Apache¬†is working properly open your server‚Äôs IP address in a web browser. You can find your IP address with command such as:
# ifconfig | grep inet
Check IP Address
4.¬†Once you know the IP address, you can enter your IP address in the browser you should see the default Apache page:
Note:¬†In case you are not able to reach the page, it could be that the firewall is blocking connection on port¬†80. You can allow connections on the default Apache ports (80¬†and¬†443) by using:
# firewall-cmd --permanent ‚Äďadd-service=http
# firewall-cmd --permanent ‚Äďadd-service=https
Open Apache Ports on Firewall
Fedora 22 Apache Default Page
5.¬†To ensure that Apache will start upon sytem boot run the following command.
# systemctl enable httpd
Enable Apache at Boot
Note:¬†The default Apache directory root for your website files is¬†/var/www/html/, make sure to place your files in there.