What is Apache HTTP Server?
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
The Apache HTTP Server (“httpd”) was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 25th birthday as a project in February 2020.
How to install Apache HTTP Server on RedHat Enterprise Linux (RHEL) 8?
Update the OS packages
1 2 |
## Update the OS packages sudo dnf update -y |
Install Apache Web Server
1 2 |
## Install Apache Web Server sudo dnf install httpd -y |
Allow Apache Server in Firewall
1 2 3 |
## Allow Apache Server in Firewall sudo firewall-cmd --permanent --add-service=https --add-service=http sudo firewall-cmd --reload |
Start and enable Apache HTTP Server
1 2 3 |
## Start and enable Apache HTTP Server sudo systemctl start httpd sudo systemctl enable httpd |
Test your Apache HTTP Server
1 2 3 |
## Test your Apache HTTP Server echo "hello world" > /var/www/index.html curl -s localhost # should return hello world |