<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.acrodus.uk/index.php?action=history&amp;feed=atom&amp;title=Apache2_config_to_allow_directory_access</id>
	<title>Apache2 config to allow directory access - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.acrodus.uk/index.php?action=history&amp;feed=atom&amp;title=Apache2_config_to_allow_directory_access"/>
	<link rel="alternate" type="text/html" href="http://wiki.acrodus.uk/index.php?title=Apache2_config_to_allow_directory_access&amp;action=history"/>
	<updated>2026-04-04T04:04:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>http://wiki.acrodus.uk/index.php?title=Apache2_config_to_allow_directory_access&amp;diff=118&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;Hello Alex, this is going to save you approximatley 2 hours of your life.  Example apache2.conf &lt;pre&gt; # This is the main Apache server configuration file.  It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.4/ for detailed information about # the directives and /usr/share/doc/apache2/README.Debian about Debian specific # hints. # # # Summary of how the Apache 2 configuration works in Debian: # The Apache...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.acrodus.uk/index.php?title=Apache2_config_to_allow_directory_access&amp;diff=118&amp;oldid=prev"/>
		<updated>2025-04-22T12:14:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Hello Alex, this is going to save you approximatley 2 hours of your life.  Example apache2.conf &amp;lt;pre&amp;gt; # This is the main Apache server configuration file.  It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.4/ for detailed information about # the directives and /usr/share/doc/apache2/README.Debian about Debian specific # hints. # # # Summary of how the Apache 2 configuration works in Debian: # The Apache...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Hello Alex, this is going to save you approximatley 2 hours of your life.&lt;br /&gt;
&lt;br /&gt;
Example apache2.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is the main Apache server configuration file.  It contains the&lt;br /&gt;
# configuration directives that give the server its instructions.&lt;br /&gt;
# See http://httpd.apache.org/docs/2.4/ for detailed information about&lt;br /&gt;
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific&lt;br /&gt;
# hints.&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# Summary of how the Apache 2 configuration works in Debian:&lt;br /&gt;
# The Apache 2 web server configuration in Debian is quite different to&lt;br /&gt;
# upstream&amp;#039;s suggested way to configure the web server. This is because Debian&amp;#039;s&lt;br /&gt;
# default Apache2 installation attempts to make adding and removing modules,&lt;br /&gt;
# virtual hosts, and extra configuration directives as flexible as possible, in&lt;br /&gt;
# order to make automating the changes and administering the server as easy as&lt;br /&gt;
# possible.&lt;br /&gt;
&lt;br /&gt;
# It is split into several files forming the configuration hierarchy outlined&lt;br /&gt;
# below, all located in the /etc/apache2/ directory:&lt;br /&gt;
#&lt;br /&gt;
#       /etc/apache2/&lt;br /&gt;
#       |-- apache2.conf&lt;br /&gt;
#       |       `--  ports.conf&lt;br /&gt;
#       |-- mods-enabled&lt;br /&gt;
#       |       |-- *.load&lt;br /&gt;
#       |       `-- *.conf&lt;br /&gt;
#       |-- conf-enabled&lt;br /&gt;
#       |       `-- *.conf&lt;br /&gt;
#       `-- sites-enabled&lt;br /&gt;
#               `-- *.conf&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# * apache2.conf is the main configuration file (this file). It puts the pieces&lt;br /&gt;
#   together by including all remaining configuration files when starting up the&lt;br /&gt;
#   web server.&lt;br /&gt;
#&lt;br /&gt;
# * ports.conf is always included from the main configuration file. It is&lt;br /&gt;
#   supposed to determine listening ports for incoming connections which can be&lt;br /&gt;
#   customized anytime.&lt;br /&gt;
#&lt;br /&gt;
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/&lt;br /&gt;
#   directories contain particular configuration snippets which manage modules,&lt;br /&gt;
#   global configuration fragments, or virtual host configurations,&lt;br /&gt;
#   respectively.&lt;br /&gt;
#&lt;br /&gt;
#   They are activated by symlinking available configuration files from their&lt;br /&gt;
#   respective *-available/ counterparts. These should be managed by using our&lt;br /&gt;
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See&lt;br /&gt;
#   their respective man pages for detailed information.&lt;br /&gt;
#&lt;br /&gt;
# * The binary is called apache2. Due to the use of environment variables, in&lt;br /&gt;
#   the default configuration, apache2 needs to be started/stopped with&lt;br /&gt;
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not&lt;br /&gt;
#   work with the default configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Global configuration&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ServerRoot: The top of the directory tree under which the server&amp;#039;s&lt;br /&gt;
# configuration, error, and log files are kept.&lt;br /&gt;
#&lt;br /&gt;
# NOTE!  If you intend to place this on an NFS (or otherwise network)&lt;br /&gt;
# mounted filesystem then please read the Mutex documentation (available&lt;br /&gt;
# at &amp;lt;URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex&amp;gt;);&lt;br /&gt;
# you will save yourself a lot of trouble.&lt;br /&gt;
#&lt;br /&gt;
# Do NOT add a slash at the end of the directory path.&lt;br /&gt;
#&lt;br /&gt;
#ServerRoot &amp;quot;/etc/apache2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.&lt;br /&gt;
#&lt;br /&gt;
#Mutex file:${APACHE_LOCK_DIR} default&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The directory where shm and other runtime files will be stored.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
DefaultRuntimeDir ${APACHE_RUN_DIR}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# PidFile: The file in which the server should record its process&lt;br /&gt;
# identification number when it starts.&lt;br /&gt;
# This needs to be set in /etc/apache2/envvars&lt;br /&gt;
#&lt;br /&gt;
PidFile ${APACHE_PID_FILE}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Timeout: The number of seconds before receives and sends time out.&lt;br /&gt;
#&lt;br /&gt;
Timeout 300&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# KeepAlive: Whether or not to allow persistent connections (more than&lt;br /&gt;
# one request per connection). Set to &amp;quot;Off&amp;quot; to deactivate.&lt;br /&gt;
#&lt;br /&gt;
KeepAlive On&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# MaxKeepAliveRequests: The maximum number of requests to allow&lt;br /&gt;
# during a persistent connection. Set to 0 to allow an unlimited amount.&lt;br /&gt;
# We recommend you leave this number high, for maximum performance.&lt;br /&gt;
#&lt;br /&gt;
MaxKeepAliveRequests 100&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# KeepAliveTimeout: Number of seconds to wait for the next request from the&lt;br /&gt;
# same client on the same connection.&lt;br /&gt;
#&lt;br /&gt;
KeepAliveTimeout 5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# These need to be set in /etc/apache2/envvars&lt;br /&gt;
User ${APACHE_RUN_USER}&lt;br /&gt;
Group ${APACHE_RUN_GROUP}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# HostnameLookups: Log the names of clients or just their IP addresses&lt;br /&gt;
# e.g., www.apache.org (on) or 204.62.129.132 (off).&lt;br /&gt;
# The default is off because it&amp;#039;d be overall better for the net if people&lt;br /&gt;
# had to knowingly turn this feature on, since enabling it means that&lt;br /&gt;
# each client request will result in AT LEAST one lookup request to the&lt;br /&gt;
# nameserver.&lt;br /&gt;
#&lt;br /&gt;
HostnameLookups Off&lt;br /&gt;
&lt;br /&gt;
# ErrorLog: The location of the error log file.&lt;br /&gt;
# If you do not specify an ErrorLog directive within a &amp;lt;VirtualHost&amp;gt;&lt;br /&gt;
# container, error messages relating to that virtual host will be&lt;br /&gt;
# logged here.  If you *do* define an error logfile for a &amp;lt;VirtualHost&amp;gt;&lt;br /&gt;
# container, that host&amp;#039;s errors will be logged there and not here.&lt;br /&gt;
#&lt;br /&gt;
ErrorLog ${APACHE_LOG_DIR}/error.log&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# LogLevel: Control the severity of messages logged to the error_log.&lt;br /&gt;
# Available values: trace8, ..., trace1, debug, info, notice, warn,&lt;br /&gt;
# error, crit, alert, emerg.&lt;br /&gt;
# It is also possible to configure the log level for particular modules, e.g.&lt;br /&gt;
# &amp;quot;LogLevel info ssl:warn&amp;quot;&lt;br /&gt;
#&lt;br /&gt;
LogLevel warn&lt;br /&gt;
&lt;br /&gt;
# Include module configuration:&lt;br /&gt;
IncludeOptional mods-enabled/*.load&lt;br /&gt;
IncludeOptional mods-enabled/*.conf&lt;br /&gt;
&lt;br /&gt;
# Include list of ports to listen on&lt;br /&gt;
Include ports.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Sets the default security model of the Apache2 HTTPD server. It does&lt;br /&gt;
# not allow access to the root filesystem outside of /usr/share and /var/www.&lt;br /&gt;
# The former is used by web applications packaged in Debian,&lt;br /&gt;
# the latter may be used for local directories served by the web server. If&lt;br /&gt;
# your system is serving content from a sub-directory in /srv you must allow&lt;br /&gt;
# access here, or in any related virtual host.&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
        Options FollowSymLinks&lt;br /&gt;
        AllowOverride None&lt;br /&gt;
        Require all denied&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /usr/share&amp;gt;&lt;br /&gt;
        AllowOverride None&lt;br /&gt;
        Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /var/www/&amp;gt;&lt;br /&gt;
        Options Indexes FollowSymLinks&lt;br /&gt;
        AllowOverride None&lt;br /&gt;
        Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;Directory /srv/&amp;gt;&lt;br /&gt;
#       Options Indexes FollowSymLinks&lt;br /&gt;
#       AllowOverride None&lt;br /&gt;
#       Require all granted&lt;br /&gt;
#&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# AccessFileName: The name of the file to look for in each directory&lt;br /&gt;
# for additional configuration directives.  See also the AllowOverride&lt;br /&gt;
# directive.&lt;br /&gt;
#&lt;br /&gt;
AccessFileName .htaccess&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following lines prevent .htaccess and .htpasswd files from being&lt;br /&gt;
# viewed by Web clients.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
        Require all denied&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following directives define some format nicknames for use with&lt;br /&gt;
# a CustomLog directive.&lt;br /&gt;
#&lt;br /&gt;
# These deviate from the Common Log Format definitions in that they use %O&lt;br /&gt;
# (the actual bytes sent including headers) instead of %b (the size of the&lt;br /&gt;
# requested file), because the latter makes it impossible to detect partial&lt;br /&gt;
# requests.&lt;br /&gt;
#&lt;br /&gt;
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.&lt;br /&gt;
# Use mod_remoteip instead.&lt;br /&gt;
#&lt;br /&gt;
LogFormat &amp;quot;%v:%p %h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %O \&amp;quot;%{Referer}i\&amp;quot; \&amp;quot;%{User-Agent}i\&amp;quot;&amp;quot; vhost_combined&lt;br /&gt;
LogFormat &amp;quot;%h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %O \&amp;quot;%{Referer}i\&amp;quot; \&amp;quot;%{User-Agent}i\&amp;quot;&amp;quot; combined&lt;br /&gt;
LogFormat &amp;quot;%h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %O&amp;quot; common&lt;br /&gt;
LogFormat &amp;quot;%{Referer}i -&amp;gt; %U&amp;quot; referer&lt;br /&gt;
LogFormat &amp;quot;%{User-agent}i&amp;quot; agent&lt;br /&gt;
&lt;br /&gt;
# Include of directories ignores editors&amp;#039; and dpkg&amp;#039;s backup files,&lt;br /&gt;
# see README.Debian for details.&lt;br /&gt;
&lt;br /&gt;
# Include generic snippets of statements&lt;br /&gt;
IncludeOptional conf-enabled/*.conf&lt;br /&gt;
&lt;br /&gt;
# Include the virtual host configurations:&lt;br /&gt;
IncludeOptional sites-enabled/*.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example sites-enables/000-default.conf. Ignore LDAP that is for active directories&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;AuthnProviderAlias ldap ldap-alias-dc01&amp;gt;&lt;br /&gt;
  AuthLDAPURL &amp;quot;ldaps://dc01.alex.electrologixs.co.uk/ou=Local Site,dc=alex,dc=electrologixs,dc=co,dc=uk?sAMAccountName?sub?(objectClass=*)&amp;quot;&lt;br /&gt;
  AuthLDAPBindDN &amp;quot;ldap@alex.electrologixs.co.uk&amp;quot;&lt;br /&gt;
  AuthLDAPBindPassword &amp;quot;Atkins123!&amp;quot;&lt;br /&gt;
&amp;lt;/AuthnProviderAlias&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /home/wireshark/download/&amp;gt;&lt;br /&gt;
        Options Indexes FollowSymLinks&lt;br /&gt;
        AllowOverride None&lt;br /&gt;
        Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
    &amp;lt;Location /&amp;gt;&lt;br /&gt;
        AuthType Basic&lt;br /&gt;
        AuthName &amp;quot;Enter AD credentials&amp;quot;&lt;br /&gt;
        AuthBasicProvider ldap-alias-dc01 &lt;br /&gt;
&lt;br /&gt;
        AuthLDAPGroupAttribute member&lt;br /&gt;
        AuthLDAPSubGroupClass group&lt;br /&gt;
        AuthLDAPGroupAttributeIsDN on&lt;br /&gt;
        Require valid-user&lt;br /&gt;
    &amp;lt;/Location&amp;gt;&lt;br /&gt;
        # The ServerName directive sets the request scheme, hostname and port that&lt;br /&gt;
        # the server uses to identify itself. This is used when creating&lt;br /&gt;
        # redirection URLs. In the context of virtual hosts, the ServerName&lt;br /&gt;
        # specifies what hostname must appear in the request&amp;#039;s Host: header to&lt;br /&gt;
        # match this virtual host. For the default virtual host (this file) this&lt;br /&gt;
        # value is not decisive as it is used as a last resort host regardless.&lt;br /&gt;
        # However, you must set it for any further virtual host explicitly.&lt;br /&gt;
        #ServerName www.example.com&lt;br /&gt;
&lt;br /&gt;
        ServerAdmin webmaster@localhost&lt;br /&gt;
        DocumentRoot /home/wireshark/download&lt;br /&gt;
&lt;br /&gt;
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,&lt;br /&gt;
        # error, crit, alert, emerg.&lt;br /&gt;
        # It is also possible to configure the loglevel for particular&lt;br /&gt;
        # modules, e.g.&lt;br /&gt;
        #LogLevel info ssl:warn&lt;br /&gt;
    #LogLevel warn authnz_ldap_module:debug&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ErrorLog ${APACHE_LOG_DIR}/error.log&lt;br /&gt;
        CustomLog ${APACHE_LOG_DIR}/access.log combined&lt;br /&gt;
&lt;br /&gt;
        # For most configuration files from conf-available/, which are&lt;br /&gt;
        # enabled or disabled at a global level, it is possible to&lt;br /&gt;
        # include a line for only one particular virtual host. For example the&lt;br /&gt;
        # following line enables the CGI configuration for this host only&lt;br /&gt;
        # after it has been globally disabled with &amp;quot;a2disconf&amp;quot;.&lt;br /&gt;
        #Include conf-available/serve-cgi-bin.conf&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, make sure your permissions are set on all the directories you are trying to access you fuckwit.&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>