linux_wiki:apache_configuration_file_walk_through

This is an old revision of the document!


Apache Configuration File Walk Through

General Information

Explanation of major sections in the Apache Configuration file.


Main Config File

  • Default Location: /etc/httpd/conf/httpd.conf


Important config file default directives

  • ServerRoot “/etc/httpd” → Where to look for web server configuration. Other config files are relative to this directory.
  • Listen 80 → Listen on tcp port 80 (on all available addresses by default)
  • Include conf.modules.d/*.conf → Load all of these Dynamic Shared Objects configuration files
  • Include conf.d/*.conf → Include additional configuration files (usually virtual hosts files are located here)
  • User apache → Default username the httpd process runs as
  • Group apache → Default group the httpd process runs as
  • DocumentRoot “/var/www/html” → Location of web documents (web pages, etc).
  • Directory blocks (<Directory>)→ Define configuration items such as access permissions within the start/end blocks
  • IfModule → Only apply the containing settings if a module exists
  • Files “.ht” → Settings for certain files. In this case, any “*.ht” files.
    • Typically used to restrict access to viewing certain files on the web.
  • ErrorLog “logs/error_log” → Location of the main error log file

  • linux_wiki/apache_configuration_file_walk_through.1474747617.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)