What is Apache HTTP?
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial, functional, and freely accessible source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, who use the Internet and the Web to communicate, plan and develop the server and related documentation.
Apache installation on CentOS 7/RHEL 7
For the Apache installation we access our server and take the session of the root user to execute the following command list.
1. We execute the following command for the apache installation
yum install httpd
2. We execute the following command to start the apache services.
systemctl start httpd
3. We execute the following command to enable apache services.
systemctl enable httpd.service
Note: In opening ports for our apache server it is necessary that our firewall is installed and enabled on our server for the following command to work, please consult the firewall settings.
4. We enable the ports for our apache server with the following command.
firewall-cmd --add-service=http –permanent
5. We restart our firewall for the changes to take effect.
How to check Apache status
Once the installation of our apache server is finished, we can start the services of our apache server, check the status, restart it, we can also edit our host and add a domain with which we want our apache server to respond.
1. we are going to enable the service of our apache server with the following command:
systemctl enable httpd
2. We start the services of our apache server with the following command:
systemctl start httpd
3. We check the status of our apache server with the following command:
systemctl status httpd
Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2019-02-20 01:29:08 UTC; 5s ago
Main PID: 1290 (httpd)
Status: "Processing requests..."
├─1290 /usr/sbin/httpd -DFOREGROUND
├─1291 /usr/sbin/httpd -DFOREGROUND