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:
How to show line number in vi / vim editor
How to search files by content in Mac / Linux
How to svn thru ssh in Linux / Mac
The Common Internet Error Code
How to send mail using different email address in Yahoo Mail
Namecheap Coupon May 2007
How to send message to syslog server?
Track Your Website Visitor With Free Invisible Website Tracker - StatCounter
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.