Remove apache test page in CentOS

1

After you install apache web server in CentOS and point your browser to http://localhost you will see a Apache 2 Test Page powered by CentOS. You can disable or remove this apache test page from the configuration file. Before you do any modification, please make sure you have the privilege to reload the apache webserver.


apache test page

To remove apache test page in CentOS, follow the steps below:-

  • Start your Terminal and login to your webserver thru SSH
  • Once logged in, edit this file with your favorite editor

/etc/httpd/conf.d/welcome.conf

The content of the file should look similar like this:

# 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.
#
<LocationMatch “^/+$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

To remove the apache test page, comments all the line like below:

# 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.
#
#<LocationMatch “^/+$”>
#    Options -Indexes
#    ErrorDocument 403 /error/noindex.html
#</LocationMatch>

 

  • now reload your apache web server
    service httpd reload
  • Now point your browser to http://localhost and you shouldn’t see any Apache Test Page again.

 

  • Good day very nice blog!! Guy .. Beautiful ..
    Amazing .. I will bookmark your blog and take the feeds
    also? I’m glad to search out numerous useful info here in the put up, we need develop more strategies in this
    regard, thanks for sharing. . . . . .