Introduction

The Apache HTTP server is the most widely used web server in the world. It offers many powerful features including dynamically loading modules, robust media support, and deep integration with other popular software.

By following this guide, you will install an Apache web server with virtual hosts on your CentOS 8 server.

Preconditions

You will need the following items to complete this guide:

Step 1 - Installing Apache

Apache is available in the CentOS default software repositories, which means you can install it with the package manager dnf.

As the non-root sudo user configured in the prerequisites, install the Apache package:

sudo dnf install httpd

After confirming the installation, will dnfinstall Apache and all required dependencies.

By performing step 4 of the Initial Server Setup with CentOS 8 guide mentioned in the Prerequisites section, you have already installed firewalldyour server to respond to requests over HTTP.

If you also plan to configure Apache to present content over HTTPS, you must also open the port 443by enabling the service https:

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

Then reload the firewall to apply these new rules:

sudo firewall-cmd --reload

After the firewall has reloaded, you are ready to start the service and check the web server.

#apache

Comment installer le serveur web Apache sur CentOS 8
1.15 GEEK