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've set up a new vServer with apache2, php5 and mysql.

When I enter my server url (e.g. in the browser it starts downloading the index.php instead of parsing it. But when I request a file (e.g. it parses it correctly.

This is in my php5.conf (snippet):

<FilesMatch "\.ph(p3?|tml)$">
    SetHandler application/x-httpd-php

I also tried replacing the above lines with:

AddType application/x-httpd-php .php .phtml .php3 .php4 .php5 .php
AddType application/x-httpd-php-source .phps

but that didn't help either.

And this is in my httpd.conf:

AddHandler php5-script  .php
DirectoryIndex index.html index.php

AddType text/html       .php

AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php

I thought this is all I have to do to get it working... Hope you can help me out!

PS: I'm a "web server admin" novice. After any changes I restart apache2 and/or do a force-reload... nothing helps :(

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.