Apache 2 recipes

Please note that I am a Debian user and these recipes may need some changes depending on the system/distribution you work on.

Per virtual host PHP enabling

I am not a big fan of PHP and try to avoid it as much as possible but I could not find any decent webmail written in an other language. I just did not feel like leaving PHP enabled for my entire web server though. I used the following hack to restrict PHP execution to my webmail virtual host:

First, edit /etc/apache2/mods-enabled/php5.conf and add:

<IfModule mod_php5.c>

  php_admin_flag engine off

Then, edit your virtual host configuration:

<VirtualHost *>

  php_admin_flag engine on


Finally, restart your web server and that should do it.