Skip to content

Instantly share code, notes, and snippets.

@tonejito
Last active August 29, 2015 13:57
Show Gist options
  • Save tonejito/9363481 to your computer and use it in GitHub Desktop.
Save tonejito/9363481 to your computer and use it in GitHub Desktop.
Apache httpd configuration file and directory structure

cd $PREFIX

grep -nr Include . | cut -d ":" -f 3-

ls -l | awk '{print $9 " " $10 " " $11}'

## Debian GNU/Linux
# Configuration file layout
PREFIX=/etc/apache2
$PREFIX/apache2.conf
| # Include module configuration:
|- Include mods-enabled/*.load
|- Include mods-enabled/*.conf
| # Include list of ports to listen on and which to use for name based vhosts
|- Include ports.conf
| # Include generic snippets of statements
|- Include conf.d/
| # Include the virtual host configurations:
\- Include sites-enabled/
# Brief directory structure
$PREFIX
|= conf.d/
|= mods-available/
|= mods-enabled/
|= sites-available/
|= sites-enabled/
|- apache2.conf
|- envvars
|- magic
\- ports.conf
## RHEL / CentOS
# Configuration file layout
PREFIX=/etc/httpd
$PREFIX/httpd.conf
\- Include conf.d/*.conf
# Brief directory structure
$PREFIX
|= conf/
| |- httpd.conf
| \- magic
|= conf.d/
|= run -> ../../var/run/httpd
|= logs -> ../../var/log/httpd
\= modules -> ../../usr/lib64/httpd/modules
## Compiled from source
# Configuration file layout
$PREFIX/httpd.conf
|- #Include conf/extra/httpd-mpm.conf
|- #Include conf/extra/httpd-multilang-errordoc.conf
|- #Include conf/extra/httpd-autoindex.conf
|- #Include conf/extra/httpd-languages.conf
|- #Include conf/extra/httpd-userdir.conf
|- #Include conf/extra/httpd-info.conf
|- #Include conf/extra/httpd-vhosts.conf
|- #Include conf/extra/httpd-manual.conf
|- #Include conf/extra/httpd-dav.conf
|- #Include conf/extra/httpd-default.conf
\- #Include conf/extra/httpd-ssl.conf
# Brief directory structure
$PREFIX
|= bin/
|= build/
|= cgi-bin/
|= conf/
| |= extra/
| |= original/
| |- httpd.conf
| |- magic
| \- mime.types
|= error/
|= htdocs/
|= icons/
|= include/
|= lib/
|= logs/
|= man/
|= manual/
\= modules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment