\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{This is the main Apache server configuration file.  It contains the}
\part{configuration directives that give the server its instructions.}
\part{See <a href="http://httpd.apache.org/docs/2.4/">http://httpd.apache.org/docs/2.4/</a> for detailed information about}
\part{the directives and /usr/share/doc/apache2/README.Debian about Debian specific}
\part{hints.}
\part{}
\part{}
\part{Summary of how the Apache 2 configuration works in Debian:}
\part{The Apache 2 web server configuration in Debian is quite different to}
\part{upstream's suggested way to configure the web server. This is because Debian's}
\part{default Apache2 installation attempts to make adding and removing modules,}
\part{virtual hosts, and extra configuration directives as flexible as possible, in}
\part{order to make automating the changes and administering the server as easy as}
\part{possible.}
\part{It is split into several files forming the configuration hierarchy outlined}
\part{below, all located in the /etc/apache2/ directory:}
\part{}
\part{/etc/apache2/}
\part{|-- apache2.conf}
\part{|   `--  ports.conf}
\part{|-- mods-enabled}
\part{|   |-- *.load}
\part{|   `-- *.conf}
\part{|-- conf-enabled}
\part{|   `-- *.conf}
\part{`-- sites-enabled}
\part{`-- *.conf}
\part{}
\part{}
\part{* apache2.conf is the main configuration file (this file). It puts the pieces}
\part{together by including all remaining configuration files when starting up the}
\part{web server.}
\part{}
\part{* ports.conf is always included from the main configuration file. It is}
\part{supposed to determine listening ports for incoming connections which can be}
\part{customized anytime.}
\part{}
\part{* Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/}
\part{directories contain particular configuration snippets which manage modules,}
\part{global configuration fragments, or virtual host configurations,}
\part{respectively.}
\part{}
\part{They are activated by symlinking available configuration files from their}
\part{respective *-available/ counterparts. These should be managed by using our}
\part{helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See}
\part{their respective man pages for detailed information.}
\part{}
\part{* The binary is called apache2. Due to the use of environment variables, in}
\part{the default configuration, apache2 needs to be started/stopped with}
\part{/etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not}
\part{work with the default configuration.}
\part{Global configuration}
\part{}
\part{}
\part{ServerRoot: The top of the directory tree under which the server's}
\part{configuration, error, and log files are kept.}
\part{}
\part{NOTE!  If you intend to place this on an NFS (or otherwise network)}
\part{mounted filesystem then please read the Mutex documentation (available}
\part{at <a href="URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex">URL:http://httpd.apache.org/docs/2.4/mod/core.html\#mutex</a>);}
\part{you will save yourself a lot of trouble.}
\part{}
\part{Do NOT add a slash at the end of the directory path.}
\part{}
\#ServerRoot "/etc/apache2"

\part{}
\part{The accept serialization lock file MUST BE STORED ON A LOCAL DISK.}
\part{}
\#Mutex file:\$\{APACHE\_LOCK\_DIR\} default

\part{}
\part{The directory where shm and other runtime files will be stored.}
\part{}
DefaultRuntimeDir \$\{APACHE\_RUN\_DIR\}

\part{}
\part{PidFile: The file in which the server should record its process}
\part{identification number when it starts.}
\part{This needs to be set in /etc/apache2/envvars}
\part{}
PidFile \$\{APACHE\_PID\_FILE\}

\part{}
\part{Timeout: The number of seconds before receives and sends time out.}
\part{}
Timeout 300

\part{}
\part{KeepAlive: Whether or not to allow persistent connections (more than}
\part{one request per connection). Set to "Off" to deactivate.}
\part{}
KeepAlive On

\part{}
\part{MaxKeepAliveRequests: The maximum number of requests to allow}
\part{during a persistent connection. Set to 0 to allow an unlimited amount.}
\part{We recommend you leave this number high, for maximum performance.}
\part{}
MaxKeepAliveRequests 100

\part{}
\part{KeepAliveTimeout: Number of seconds to wait for the next request from the}
\part{same client on the same connection.}
\part{}
KeepAliveTimeout 5

\part{These need to be set in /etc/apache2/envvars}
User \$\{APACHE\_RUN\_USER\}<br />
Group \$\{APACHE\_RUN\_GROUP\}

\part{}
\part{HostnameLookups: Log the names of clients or just their IP addresses}
\part{e.g., <a href="http://www.apache.org">www.apache.org</a> (on) or 204.62.129.132 (off).}
\part{The default is off because it'd be overall better for the net if people}
\part{had to knowingly turn this feature on, since enabling it means that}
\part{each client request will result in AT LEAST one lookup request to the}
\part{nameserver.}
\part{}
HostnameLookups Off

\part{ErrorLog: The location of the error log file.}
\part{If you do not specify an ErrorLog directive within a <VirtualHost>}
\part{container, error messages relating to that virtual host will be}
\part{logged here.  If you \textit{do} define an error logfile for a <VirtualHost>}
\part{container, that host's errors will be logged there and not here.}
\part{}
ErrorLog \$\{APACHE\_LOG\_DIR\}/error.log

\part{}
\part{LogLevel: Control the severity of messages logged to the error\_log.}
\part{Available values: trace8, ..., trace1, debug, info, notice, warn,}
\part{error, crit, alert, emerg.}
\part{It is also possible to configure the log level for particular modules, e.g.}
\part{"LogLevel info ssl:warn"}
\part{}
LogLevel warn

\part{Include module configuration:}
IncludeOptional mods-enabled/\textit{.load<br />
IncludeOptional mods-enabled/}.conf

\part{Include list of ports to listen on}
Include ports.conf

\part{Sets the default security model of the Apache2 HTTPD server. It does}
\part{not allow access to the root filesystem outside of /usr/share and /var/www.}
\part{The former is used by web applications packaged in Debian,}
\part{the latter may be used for local directories served by the web server. If}
\part{your system is serving content from a sub-directory in /srv you must allow}
\part{access here, or in any related virtual host.}
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>
<Directory /usr/share><br />
AllowOverride None<br />
Require all granted<br />
</Directory>

<Directory /var/www/><br />
Options Indexes FollowSymLinks<br />
AllowOverride None<br />
Require all granted<br />
</Directory>

\#<Directory /srv/>

\part{Options Indexes FollowSymLinks}
\part{AllowOverride None}
\part{Require all granted}
\#</Directory>

\part{AccessFileName: The name of the file to look for in each directory}
\part{for additional configuration directives.  See also the AllowOverride}
\part{directive.}
\part{}
AccessFileName .htaccess

\part{}
\part{The following lines prevent .htaccess and .htpasswd files from being}
\part{viewed by Web clients.}
\part{}
<FilesMatch "\^{}.ht"><br />
Require all denied<br />
</FilesMatch>

\part{}
\part{The following directives define some format nicknames for use with}
\part{a CustomLog directive.}
\part{}
\part{These deviate from the Common Log Format definitions in that they use \%O}
\part{(the actual bytes sent including headers) instead of \%b (the size of the}
\part{requested file), because the latter makes it impossible to detect partial}
\part{requests.}
\part{}
\part{Note that the use of \%\{X-Forwarded-For\}i instead of \%h is not recommended.}
\part{Use mod\_remoteip instead.}
\part{}
LogFormat "\%v:\%p \%h \%l \%u \%t "\%r" \%>s \%O "\%\{Referer\}i" "\%\{User-Agent\}i"" vhost\_combined<br />
LogFormat "\%h \%l \%u \%t "\%r" \%>s \%O "\%\{Referer\}i" "\%\{User-Agent\}i"" combined<br />
LogFormat "\%h \%l \%u \%t "\%r" \%>s \%O" common<br />
LogFormat "\%\{Referer\}i -> \%U" referer<br />
LogFormat "\%\{User-agent\}i" agent

\part{Include of directories ignores editors' and dpkg's backup files,}
\part{see README.Debian for details.}
\part{Include generic snippets of statements}
IncludeOptional conf-enabled/*.conf

\part{Include the virtual host configurations:}
IncludeOptional sites-enabled/*.conf

\end{document}
