Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

??  Create new ones and add them to the current location see "Where are the configuration files"

Where are the configuration files.

http://wiki.apache.org/httpd/DistrosDefaultLayout

Centos

 ServerRoot              ::      /etc/httpd
 Primary Config Fle      ::      /etc/httpd/conf/httpd.conf
 Other Config Files      ::      /etc/httpd/conf.d
 Module Locations        ::      /usr/lib/httpd/modules
 DocumentRoot            ::      /var/www/html
 ErrorLog                ::      /var/log/httpd/error_log
 AccessLog               ::      /var/log/httpd/access_log
 cgi-bin                 ::      /var/www/cgi-bin (empty and disabled by default)
 binary                  ::      /usr/sbin/httpd
 runtime directory       ::      /etc/httpd/run
 start/stop              ::      /sbin/service httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

Notes:

  1. There is an extra config file in /etc/sysconfig/httpd which can be used to change to the worker mpm /usr/sbin/httpd.worker. 

  2. Extra config files named *.conf are loaded from /etc/httpd/conf.d. This directory is used by packages like mod_python for drop-in configs 

  3. If you're having issues with authorization and your permissions are correct, you might have problems with SELinux permissions. Take a look at httpd_selinux(8) and related documentation. Particularly sealert(8) can be used for analysis and suggested solutions.

Debian Debian, Ubuntu (Apache httpd 2.x):

 ServerRoot              ::      /etc/apache2
 DocumentRoot            ::      /var/www
 Apache Config Files     ::      /etc/apache2/apache2.conf
                         ::      /etc/apache2/ports.conf
 Default VHost Config    ::      /etc/apache2/sites-available/default, /etc/apache2/sites-enabled/000-default
 Module Locations        ::      /etc/apache2/mods-available, /etc/apache2/mods-enabled
 ErrorLog                ::      /var/log/apache2/error.log
 AccessLog               ::      /var/log/apache2/access.log
 cgi-bin                 ::      /usr/lib/cgi-bin
 binaries (apachectl)    ::      /usr/sbin
 start/stop              ::      /etc/init.d/apache2 (start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean)

Notes:

 

  1. The Debian/Ubuntu layout is fully documented in /usr/share/doc/apache2/README.Debian 

  2. Debian/Ubuntu use symlinks to configure vhosts and load modules. Configuration files are created in their respective sites-available and mods-available directories. To activate vhosts and modules, symlinks are created in the respective sites-enabled and mods-enabled directories to the config files in either sites-available and mods-available. Debian provides scripts to handle this process called 'a2ensite' and 'a2enmod' which activates vhosts and modules. 

  3. The default vhost is defined in /etc/apache2/sites-available/default, and overrides the DocumentRoot set in the server context.