You should see a default page like the one in the image below. To verify that the Apache web server is up and running, open your web browser and go to your server's IP Address with the url. You can configure the Apache service to start on boot by running the following command: sudo systemctl enable httpd Restart the Apache service to reflect the changes: sudo systemctl start httpd In CentOS7 the default Apache DocumentRoot path is /var/file in this directory. Reload the firewall service for the changes to take effect. Sudo firewall-cmd -permanent -add-port=443/tcp You can do this by running the following commands: sudo firewall-cmd -permanent -add-port=80/tcp You will need to allow the default Apache port 80 (HTTP) and 443 (HTTPS) using FirewallD. Save and close the file, then restart your machine for the changes to take effect. You can disable SELinux by editing the /etc/selinux/config file: sudo nano /etc/selinux/configĬhange the line from SELINUX=enforcing to SELINUX=disabled SELINUX=disabled
It is recommended that you disable it first.
You can do this by running the following commands: sudo yum update -yīy default SELinux is enabled in CentOS 7. Update the package repositoryīefore installing Apache, it is a good idea to update the package repository. This section will walk you through the process of preparing your server for Apache, setting up Apache, and testing the installation.
This tutorial will explain how to install and configure a basic and secure Apache web server in CentOS 7. It is also one of the most secure web servers available. The Apache web server is one of the most popular and powerful web servers in the world.