Apache httpd : Install2021/05/18 |
Install Apache httpd to configure Web Server.
|
|
[1] | Install Apache httpd. |
[root@www ~]#
dnf -y install httpd # rename or remove welcome page [root@www ~]# mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.org |
[2] | Configure httpd. Replace Server name to your own environment. |
[root@www ~]#
vi /etc/httpd/conf/httpd.conf # line 89 : change to admin's email address ServerAdmin root@srv.world
# line 98 : change to your server's name ServerName www.srv.world:80
# line 147 : change (remove [Indexes]) Options FollowSymLinks # line 154 : change AllowOverride All
# line 167 : add file name that it can access only with directory's name DirectoryIndex index.html index.php index.cgi
# add follows to the end # server's response header
ServerTokens Prod
systemctl enable --now httpd |
[3] | If Firewalld is running, allow HTTP service. HTTP uses 80/TCP. |
[root@www ~]# firewall-cmd --add-service=http --permanent success [root@www ~]# firewall-cmd --reload success |
[4] | Create a HTML test page and access to it from any client computer with web browser. It's OK if following page is shown. |
[root@www ~]#
vi /var/www/html/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page </div> </body> </html> |
Sponsored Link |