Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have asked a question which was related to this but not same,

I have a centos VPS, which has two wordpress websites, one is and another is, now for virtual hosting using just ONE IP ADDRESS, first I started, which is working fine, when I added then, it is loading default Centos page instead of my website, and I am just testing my onlinemba123 website, I haven't configured DNS for it, I am testing it through editing my PC's hosts file,

My website folder names are also same as in the conf file below

Now my question is how can I load my website instead of Default page, is my virtual host config fine?

My virtual host config:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /var/www/html/
    ErrorLog logs/
    CustomLog logs/ common
<VirtualHost *:80>
    DocumentRoot /var/www/html/
    ErrorLog logs/onlinemba123-error_log
    CustomLog logs/onlinemba123-access_log common

My computers host file is:
share|improve this question
up vote 1 down vote accepted

Put an index file in the document root for the virtual host(s) in question.

share|improve this answer
index file? You mean the index file which is inside that wordpress(onlinemba123) folder? – ntechi Feb 11 '11 at 5:29
One of the filenames given in the DirectoryIndex directive. – Ignacio Vazquez-Abrams Feb 11 '11 at 5:31
@Ignacio Vazquez-Abrams I am still not getting which Index File, sorry for been a jerk but I am learning something new – ntechi Feb 11 '11 at 5:47
Try putting a file called index.html or index.php in place. – Ignacio Vazquez-Abrams Feb 11 '11 at 5:49
@Ignacio Vazquez-Abrams OK I inserted one inex.html file into folder and when I checked it, then I am getting that index.html instead of Centos Default page, So it means that my wordpress is having problems, am I rite? – ntechi Feb 11 '11 at 5:59

Just add index.php or index.html(depend upon the priority order) the file in the document root for the virtual host mentioned in question. For PHP based website its should work.

share|improve this answer
Thanks, but this does appear to be the same answer that was accepted 3 years ago. – Felix Frank Jun 21 '14 at 11:15

Or maybe your Apache is not rightly set up for working with php. Put a file named index.php and in there put <?php phpinfo(); ?>. If you see this line right this way then your apache needs to be configured to work with php, else if you see a phpinfo page - something like a page with a blue bar at the top - then your apache is ok to php, so there´s something wrong with your wordpress files. See the index.php file from it. Success for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.