I’m looking to run a Debian VPS as a web server. I’ve got Debian 6 installed, and I’ve got the default Apache 2 installation on there.
I’ve read a bit about how Apache 2 configuration is arranged slightly differently on Debian, and I just wanted to check I understand how Debian expects me to make my configuration changes to Apache.
My understanding is:
To add modules:
- Install the module using
apt-get - Enable the module using
a2enmod
To add Virtual Hosts:
- Create a separate configuration file for each virtual host (preferably named similarly to the virtual host’s intended domain name) in
/etc/apache2/sites-available/ - Enable the site using the
a2ensitecommand
To do anything else:
- Create a separate configuration file for each configuration task in
/etc/apache2/conf.d/. All files in this directory are included by default.
I’m basing this on http://www.control-escape.com/web/configuring-apache2-debian.html, and /usr/share/doc/apache2.2-common/README.Debian.gz.
Am I understanding this correctly? I’m guessing that editing e.g. apache2.conf directly isn’t a good way to add my own configuration settings, as my changes could be blitzed by an update in the future?