LAMPS and lampshades
I've been slowly working on turning my computer in to a web server, so that I can host my own photo gallery, and so that I'll have some space I can work with to develop web pages. Step by step, I've been reading up on security for apache, and modifying my server to lock it down. The last thing I want is to have my computer hacked.
Unfortunately, when I finally took the step of installing gallery2, the photo gallery software, I discovered nothing was working properly. Oh, pages were showing and my security was working well, but gallery2 just didn't want to start up. For that matter, I couldn't even get the test php scripts working. After hours of searching, I finally discovered the key: I had somehow managed to get both apache (1.3) and apache2 running at the same time. My locked down config belonged to apache, while php4 was installed on apache2. So, every time I browsed into the directory with the test.php script in it, I hit the apache 1.3 configuration, which didn't know what php was - hence, it prompting me to download the php file instead of opening it.
the solution? uninstalling apache 1.3, of course. Fortunately, using ubuntu, this took only a few seconds:
sudo apt-get remove apache
leaving apache2 behind. Unfortunately, I now have to redo all of my security fixes, but everything seems to be working.