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.
To remove apache test page in CentOS, follow the steps below:-
Advertisements
- 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.
Related posts:
Woocommerce: Coupon for new customer / first order only
How to extract password rar file in command line - Linux
How to send message to syslog server?
CPAN Error: make test had returned bad status, won't install without force
Prestashop 1.5 - How to enable add to cart button at Home Featured Product?
N900 virtual keyboard not working after uninstall SCIM
Bootstrap - The Responsive Framework
How to setup SSH without password
Share this with your friends:-
I’m completely lost
Options -Indexes
ErrorDocument 403 /error/noindex.html
removing the test wont affect anything except the welcome page.
Hi, i have a problem… i have read your recommendations, the issue is that we don´t have that files that you mention (the folder call “test” was erasure) but i still have the test page on my site. We have install wordpress a few days ago with the respective coming soon page and i was right and now we have this APACHE page, and we don´t know what do to have our page back. We don´t have any idea abut apache, and we dont have this: /etc/httpd/conf.d/welcome.conf .. we dont know if this is because the folder “test” was remove.
Thanks – it worked for me!
Work, thank’s 🙂
It work for me, thank’s
I’m sorry but it doesn’t work for me, if I comment the lines in welcom.conf file it still shows the Apache Test Page. And even if I add an index.html file in /var/www/html the result is the same.
How can I get rid of this page and put the one that I want?
Thanks
NO! it is still in page: Apache 2 Test Page powered by CentOS
Muchas gracias por vuestro aporte.
Gracias.
By default if you comment out welcome.conf you get a browser page showing the index of the http root folder (I’m using CentOS 5.5 with Apache 2.2.3). Most folks probably don’t want this.
Maybe a better way is to run the command:
# touch /var/www/html/index.html
This creates a blank index.html file and when you browse the site you just get a white screen. Another benefit of this method is you don’t have to restart Apache for it to take effect.