fbpx Configuration files, Debian Server, Debian Dedicated Server | HostingUltraso.com
24/7/365 Support

Configuration files

The basic configuration file layout is as follows and is also documented in the /etc/apache2/apache2.conf:

/etc/apache21 1--apache2 .conf

1 ' --ports .conf 1--mods-enabled 1 1--'.load

1 ' --". conf 1--conf .d

! . sites-enabled

The files shown are the only ones that are considered part of the actual apache2 configuration by virtue of being included by commands in the main configuration file or one of the files it includes. Note that there is also a sites-available and a mods-available directory that are not automatically included in the configuration. The files in these latter two directories are included by virtue of links pointing to them from the mods-enabled and sites-enabled directories, which we will cover shortly.

In general, configuration changes will be limited to the ports.conf file, adding or modifying files in conf.d, and the links in mods-enabled and sites-enabled directories (and the files they point to). Any files you modify that are provided as part of one of the Debian packages will, of course, be checked during upgrades and you will be prompted for the proper action. Such files are generally only:

  • envvars: This is the file containing environment variables used by Apache and the apache2ctl utility
  • ports.conf: This is the file that controls which ports and IP addresses Apache listens on
  • conf extension files in mods-available directory: These are the files which control the configuration of a module when loaded
  • default and default-ssl in sites-available directory: These are the files which control the behavior of the default web service
  • files in the conf.d directory: These are the files that are part of add-on packages, such as phpmyadmin

Modifications to these files should, of course, be kept to a minimum, but sometimes they are necessary. Most local configuration will be done by adding files to the conf.d directory, or to the sites-available directory (along with appropriate links in the sites-enabled directory), where virtual hosts are configured.

In Debian 7, the files are only included if they begin with a letter or number. It does not include .dpkg and do not contain anything other than letters, numbers, and underscores. In Debian 8, only files that end in .conf or .load will be included.

Help Category:

What Our Clients Say