Now we got to install some modules. You're not obliged to install the same as I do, but I think it's good stuff.
First thing to install: PHP. Because more than 75% of websites are PHP-based, and I suppose more than 75% people reading this tuto will use PHP.
Thanks to an “apt-cache search apache2” we'll find that the package we need is called “libapache2-mod-php5”, so:
#apt-get install libapache2-mod-php5
Now let's test by putting a phpinfo.php page in our default site:
#vi /home/default/phpinfo.php
and write
<?php phpinfo(); ?>
And in firefox open the url http://ksXXXXXX.kimsufi.com/phpinfo.php you should see tables with informations about your PHP server.
Good. Now I'm used to install the suPHP module too. It's better for the most of the scripts and for security too. It's an module to run php scripts with the owner permissions. If you know linux a minimum, you'll see the advantage ;-)
#apt-get install libapache2-mod-suphp
Now, if you've done things in the same order than me, you should notice that your phpinfo page isn't available anymore and you get a Internal Server Error. Don't stress, I have the cure. Just add the following line in the directory declaration of your vhost “AddHandler application/x-httpd-php .php” to tell apache that .php pages have to be run with PHP (it seems to work before suPHP was installed thanks to a default configuration of apache). And to be sure all will work, change the owner and the chmod of your site. I've created an user called “default” for that.
#chown default:users /home/default/ -R
#chmod 755 /home/default/ -R
Now it should work. Ok, now we have a server with apache and PHP, with the highest level of security we could except (well I think). It's the standard configuration for the most of the sites. You could install the following modules too:
- php5-gd
- php5-mysql
- php-pear
- php5-imap
- php5-curl
And let's go to chapter 5 now: Bind installation
![[en]](http://blog.shinji.fr/content/img/flags/flag.en.gif)
![[fr]](http://blog.shinji.fr/content/img/flags/flag.fr.gif)