I have installed Debian 4.0 at my friend's computer. It didn't have apache2 by default so I installed it from sarg repository. I noticed that httpd.conf was changed to apache2.conf so it didn't allow me to start the server. After eliminating this problem I installed PHP5 with libapache2-mod-php5.
Then I added following lines to apache2.conf:
# Use for PHP 5.x:
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
AddHandler php5-script php
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html php
# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
I found libphp5.so in /usr/lib/apache2/modules/ so I added all address path to it. When I restart apache it doesn't give me any error, but when I try to open a php file, it tries to download it instead.
I have installed php and apache several times in fedora 3,4 and all ubuntu versions, but I never thought that installing it on Debian is so difficult. I just chose Debian, because of its famous stablity. I am even thinking about installing ubuntu server instead of Debian, since ubuntu has been very stable for me as a desktop OS and softwares that are coming with it are from latest versions. However, I have never seen any recommendation of installing ubuntu as a server.
I will really appreciate if you help me.
Thank you in adcance.