httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Brown <>
Subject Re: [users@httpd] Apache Configuration Cleanup Help
Date Tue, 21 Feb 2012 20:31:49 GMT

What you're seeing are the standard Debian/Ubuntu configuration files 
for Apache. The configuration is broken up across several files in an 
attempt to make administration simpler:

/etc/apache2/apache2.conf - main configuration file; usually not 
necessary to change; pulls in via the Include directive ports.conf, 
security, modules confs and loads, httpd.conf, and virtual host confs

/etc/apache2/ports.conf - interface/port-related directives like Listen, 
and NameVirtualHost if you're using name-based virtual hosts; very important

/etc/apache2/conf.d/security - security-related directives like 

/etc/apache2/mods-available/<module>.conf and <module>.load - directives 
for module <module>

/etc/apache2/httpd.conf - main server directives e.g. ServerName that 
are not in /etc/apache2/apache2.conf; if you're not using virtual 
servers then most of the remainder of your configuration would typically 
go here

/etc/apache2/sites-available/<site> - directives for virtual host <site>

Not only is there a particular configuration file setup. But there are 
also scripts used to enable and disable modules and sites. E.g. a2enmod 
<module> creates a symbolic link to /etc/apache2/mods-available/<module> 
in /etc/apache2/mods-enabled/ and a2dismod <module> deletes it. a2ensite 
<site> and a2dissite <site> work similarly. Only the -enabled 
directories are pulled into /etc/apache2/apache2.conf.

It takes some getting used to, but this approach keeps things nicely 
segregated and is a big help in a complicated setup.


On 21/02/12 20:17, wrote:
> I’ve recently inherited the administration duties of my team’s Apache 
> server. I’m new to Apache, but I’ve been picking up as much as I can 
> through tutorials and Google, and from what I can tell the original 
> setup of our server is messy. Someone decided it was a good idea to 
> configure the server to startup using apache2.conf, then use 
> httpd.conf and ports.conf as secondary configuration files. I’d like 
> to standardize our setup – to that end, I’ve taken a standard 
> httpd.conf file from my company’s tutorial, merged in all our settings 
> from the trio of config files and attempted to refresh Apache with the 
> new file. It won’t start with the file named httpd.conf, it complains 
> that there’s no apache2.conf file to read, but even if I name the file 
> how the server expects I get errors that look pretty basic to me. For 
> example, I get the error: “ Invalid command 'ServerType', perhaps 
> misspelled or defined by a module not included in the server 
> configuration.” I receive the same error for the UserDir property, 
> among others.
> With the setup I’ve described, is there any way to figure out what is 
> going on? Why it looks for the wrong file at first, and why it can’t 
> recognize standard properties like ServerType? Am I missing pieces of 
> the installation? Or should I just keep commenting out everything 
> that’s causing problems? We’re running Apache version 2.2.14 on an 
> Ubuntu installation, version 10.04.3.
> ------------------------------------------------------------------------
> Subject to local law, communications with Accenture and its affiliates 
> including telephone calls and emails (including content), may be 
> monitored by our systems for the purposes of security and the 
> assessment of internal compliance with Accenture policy.
> ______________________________________________________________________________________

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message