Remove Apache Test Page on Fedora 30/29

0
2040

In this guide, we are going to briefly show you how to remove Apache test page on Fedora 30/29. As one of the ways of hardening your web server, it is good idea to remove Apache test page.

Want to install Apache on Fedora 30? See our guide by following the link below;

Install Apache on Fedora 30

Remove Apache Test Page on Fedora 30/29

The Apache test page is located under /usr/share/httpd/noindex/. This page is defined by the configuration file, /etc/httpd/conf.d/welcome.conf.

Therefore, to remove this test page, you can explicitly remove the welcome page configuration file, rename it or comment all the lines defining this page.

To comment out the test page configuration file, open it with your preferred editor and edit it such that it looks like;

# 
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL.  To disable the
# Welcome page, comment out all the lines below. 
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
#<LocationMatch "^/+$">
#    Options -Indexes
#    ErrorDocument 403 /.noindex.html
#</LocationMatch>
#
#<Directory /usr/share/httpd/noindex>
#    AllowOverride None
#    Require all granted
#</Directory>
#
#Alias /.noindex.html /usr/share/httpd/noindex/index.html

To rename the test page configuration;

mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.bak

To remove it explicitly;

rm -rf mv /etc/httpd/conf.d/welcome.conf

Restart Apache

Once you have done that, restart the web server.

systemctl restart httpd

Well, you can also remove the test page itself.

mv /usr/share/httpd/noindex/index.html /usr/share/httpd/noindex/index.html,bak

That is all about how to remove Apache welcome page on Fedora 30/29. Feel free to drop any comments. Enjoy.

LEAVE A REPLY

Please enter your comment!
Please enter your name here