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

Okay, so installed xamp on my ubuntu machine, started it up and everything worked. Apache ran my php app just fine (including requests to the root url "/"). However, after the first reboot since installing, when I request "http://localhost/" apache serves up the index php page as a phtml source file. All other urls (like "http://localhost/login") work as expected.

Backgound: The only modification I made to xamp was to setup a vhost for my app. The app uses an .htaccess file where I define some rewrite rules (the app is an MVC framework and all urls are rewritten to a single entry point php file). I'm using Xamp because I need php >= 5.3.0.

I know apache will serve up the source of a php file when it doesn't know to process php files. But the config does indeed have "AddType application/x-httpd-php .php" and as I said, the app works for all urls except the root "/" (and only since I've rebooted). The .htaccess file does contain a DirectoryIndex directive.

xamp 1.3.7a Ubuntu 9.10

Any ideas?

share|improve this question
First things first - does disabling the added vhost and .htaccess solve the problem? Anything in the logs? –  Zayne S Halsall Nov 20 '10 at 8:09

1 Answer 1

Uninstall xampp - xampp is more useful for windows

And use this single line command to install the LAMP stack

sudo apt-get install apache2 php5 mysql-client-5.0 mysql-server-5.0 phpmyadmin libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql
share|improve this answer

Your Answer


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