1

Based on this http://www.servermom.com/how-to-add-new-site-into-your-apache-based-centos-server/454/ tutorial installed Apache-based CentOS Server

I use putty.exe as editor

vi /etc/httpd/conf/httpd.conf at very bottom modified to

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/fikitipis.com/public_html
    ServerName www.fikitipis.com
    ServerAlias fikitipis.com
    ErrorLog /var/www/fikitipis.com/error.log
    CustomLog /var/www/fikitipis.com/requests.log common
</VirtualHost>

So expect that index is at /var/www/fikitipis.com/public_html

When in browser type ip address of server, see Apache 2 Test Page powered by CentOS and so on You may now add content to the directory /var/www/html/

Then

[root@vps ~]# ls /var/www/

see

cgi-bin  domain.com  error  fikitipis.com  html  icons 

Checking content of directories

ls /var/www/domain.com/public_html, ls /var/www/fikitipis.com/public_html, /var/www/html/ are empty

Where is index.html?

Did touch /var/www/fikitipis.com/public_html/index1.html then vi /var/www/fikitipis.com/public_html/index1.html, typed a, then wrote some text in file, then Escape and shift+zz. And in browser http://111.111.11.111/index1.html and see what I had wrote. So until now seems that all works

2
  • It doesn't exist, according to what you've posted. Is there anything that makes you think it does?
    – MadHatter
    Oct 22, 2013 at 15:00
  • I am newbie. No so much knowledge (simply did all according to tutorial; Do not know (think) if index.html must exist). Will try to create new file and check if in browser address bar can access it..
    – Andris
    Oct 22, 2013 at 15:16

2 Answers 2

3

The ErrorDocument you're seeing (see John's post) is a special piece of configuration that's installed in CentOS/RHEL by default. If you want to disable it, blank out the contents of /etc/httpd/conf.d/welcome.conf. (Don't delete the file, because RPM will just put it back the next time you upgrade the httpd package.)

1
  • My first google result was... the geek diary, which suggested removing it, which as you pointed out, is wrong, but also, suggested enabling index without explanation, which is really dangerous. THIS is why comments need to be enabled on any article :/
    – Ray Foss
    Nov 30, 2020 at 15:09
1

The "Apache 2 test page" is the error document. It is not an actual page.

4
  • I read This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page it means that the Apache HTTP server installed at this site is working properly. I have seen such pages before and does not seems error page
    – Andris
    Oct 22, 2013 at 15:18
  • It is the error page. Look for the ErrorDocument directive in your configuration. That directive points you to a file that contains the test page. What the page actually says has nothing to do with where the page is coming from.
    – John
    Oct 22, 2013 at 15:24
  • Oh. Does it means that I installed incorrectly?
    – Andris
    Oct 22, 2013 at 15:33
  • The page being displayed means that it is installed and is serving documents (including the configured ErrorDocument).
    – John
    Oct 22, 2013 at 16:34

Not the answer you're looking for? Browse other questions tagged .