Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
Your <Directory> directive is missing a leading slash. I don't think that's the cause of the problem, however. You also have two dots in the ServerAlias directive. –  Ladadadada Dec 5 '12 at 9:24
    
Could you add the output of ls -l /var/www/html/mmm/public/index.php to your question? –  Ladadadada Dec 5 '12 at 9:29

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.