How to remove apache test page in CentOS

advertisement

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
  • The content of the file should look similar like this:-
  • To remove the apache test page, comments all the line like below:-
  • 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:

Create Gmail with plus addressing to prevent spam
How to auto start Apache during boot time - Linux
Install eAccelerator to Optimize PHP performance
How to publish blogger content to my domain
How to reload .bash_profile in Linux or Mac?
How to move cursor to end of line in vi editor
How to setup mysqldump without password in cronjob
How to install flash player in Ubuntu






10 Responses to “How to remove apache test page in CentOS”

  1. KHALIQ KAKAR says:

    Options -Indexes
    ErrorDocument 403 /error/noindex.html

  2. chua says:

    removing the test wont affect anything except the welcome page.

  3. Ivette says:

    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.

  4. Rahul says:

    Thanks – it worked for me!

  5. Nikola says:

    Work, thank’s :)

  6. diantokam says:

    It work for me, thank’s

  7. Roberto says:

    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

  8. ben says:

    NO! it is still in page: Apache 2 Test Page powered by CentOS

  9. Jorge says:

    Muchas gracias por vuestro aporte.

    Gracias.

  10. Bernie says:

    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.

Leave a Reply