Error configuring virtual hosts

Posted by user148351 on Server Fault See other posts from Server Fault or by user148351
Published on 2012-12-05T09:14:49Z Indexed on 2012/12/05 11:08 UTC
Read the original article Hit count: 247

Filed under:
|
|

i Have a problem using my virtual hosts: When i try to connect to my server on direct ip adress, for example

http://111.11.11.111/

in apache error log i see following error:

script '/var/www/html/mmm/public/index.php' not found or unable to stat

File index.php exists!!! and has correct access rights.

I have virtual hosts configured

<VirtualHost *:80>
    DocumentRoot /var/www/html/mmm/public
    ServerName example.com
    ServerAlias example.com www.example..com
     <Directory var/www/html/mmm/public>
        AllowOverride All
    </Directory>
</VirtualHost>

Why when I try to connect to ip address - it try to search index.php not in servers root directory, but in root directory of virtual host.

© Server Fault or respective owner

Related posts about apache2

Related posts about virtualhost