By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

The location of Apache Configuration files in Ubuntu

Where to find Apache configuration files after installing Apache in Ubuntu.

Edited: 2016-01-09 06:50

The location of the Apaches configuration files depends on how you installed the server. If you installed the official package the files will usually be located in /etc/apache2/

The vhost configuration is located in /etc/apache2/sites-enabled. The file you need to edit when configuring virtual hosts is likely called default or 000-default.

The apache2.conf file is located in the root of the /etc/apache2/ directory.

Apache modules

The mudule configuration files are located in a subdirectory of the /etc/apache2/ directory, but you should not normally have to modify the files manually. Instead try using the terminal commands for installing, enabling and disabling apache mods. I.e.:

sudo apt-get install libapache2-modsecurity

To enable a mod type the following:

sudo a2enmod module_name

And to disable mods:

sudo a2dismod module_name

Remember to restart apache after making changes. See also: Starting, Stopping and Restarting Web-servers in terminal