Apache: How to install on RHEL 8 / CentOS 8 Linux (file sharing server setup)
The Apache HTTP Server or simply Apache, is free and open-source cross-platform web server software developed and maintained by Apache Software Foundation. Apache is a easy to learn and configure web server providing an ability to host websites mainly via HTTP or HTTPS protocols. Under RHEL 8 / CentOS 8 system Apache webserver is know under name httpd
.
In this tutorial you will learn:
- How to install Apache webserver
- How to enable and start Apache webserver
- How to open firewall HTTP port 80
- How to create basic same website
First step is to use
dnf
command to install package called httpd
: # dnf install httpd
STEP-2:
Run and enable the Apache webserver to start after reboot:
# systemctl enable httpd # systemctl start httpd
STEP-3:
Optionally, if you need your Apache web server to be accessed from remote locations open HTTP firewall port 80:
# firewall-cmd --zone=public --permanent --add-service=http # firewall-cmd --reload
For more information visit RHEL 8 open HTTP firewall port 80 and HTTPS port 443 with firewalld tutorial.
STEP-4:
Insert your website files.
By default the Apache web server will greet you with a default welcome page.To disable the default Apache welcome page insert your
index.html
into /var/www/html/
directory.For example:
echo Apache on RHEL 8 / CentOS 8 > /var/www/html/index.html
STEP-5:
Access your website.
To access your new sample website navigate your web browser to either
http://YOUR-APACHE-IP-ADDRESS
or http://YOUR-APACHE-HOSTNAME
. For example http://192.168.1.151
.REFERENCES:
https://linuxconfig.org/installing-apache-on-linux-redhat-8
Comments
Post a Comment