Apache and PHP on Sarge

Originally posted on December 1st, 2005 on another blog, here is how I installed apache and php on a Debian Sarge.

#aptitude install libapache2-mod-php4 apache2-doc

first of all let’s fix the apache2 documentation. Go to the /var/www directory and link to the documentation

#cd /var/www
#ln -s /usr/share/doc/apache2-doc/manual .

Let’s now configure the ports and who can access the service. If you want to enable only lo interface (localhost) to access the apache services just edit the /etc/apache2/ports.conf file make it looks something similar to


If you want to leave free access to everybody, just put a line like the following

Listen 80

or desired port.

Let’s restart the service

#/etc/init.d/apache2 restart

If you want to remove the auto startup of the daemon, so

#update-rc.d -f apache2 remove

easy as drinking a glass of water 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s