<Directory 'restricted directory here'>
order deny,allow
deny from all
allow from 'your domain name here'
</Directory>
Restrict access based on passwords
<Directory 'restricted directory here'>
AuthType Basic
AuthName 'name of authorised group here'
AuthGroupFile 'location of group file'
AuthUserFile 'location of password file here'
order deny,allow
deny from all
allow from 'your domain name here'
require group 'name of authorised group here'
</Directory>
Restrict access based on either passwords or internal access
<Directory 'restricted directory here'>
AuthType Basic
AuthName 'name of authorised group here'
AuthGroupFile 'location of group file'
AuthUserFile 'location of password file here'
order deny,allow
deny from all
allow from 'your domain name here'
require group 'name of authorised group here'
satisfy any
</Directory>
Restrict access to external locations
<Location 'restricted URL here'>
order deny,allow
deny from all
</Location>
Disable directory listings of those directories not containing a Directory Index file at the server level, but allow directory listings on specific directories.
<Directory 'DocumentRoot here'>
Options FollowSymLinks
</Directory>
<Directory 'Directory to allow indexing on here'>
Options +Indexes
</Directory>
Forward all URL requests to a remote server, for example to access its cache manager.
As only http proxy request are currently supported, none http requests (eg., ftp) will be encapsulated as http proxy requests.
ProxyRemote * http://'Remote server here':'Remote port here'
In order to speed up handling of requests the number of directories through which Apache has to search for .htaccess files should be minimised. Searching starts from the root directory downwards. Therefore the AllowOverride option should be turned off at the root directory and only turned on at the directory level required.
<Directory />
AllowOverride None
</Directory>
<Directory 'Directory to allow .htaccess file in here'>
AllowOverride All
</Directory>
The modules which are included in a particular Apache executable can be determined by use of the -l option.
httpd -l
To enable the server to display current details about how well it is performing and what it is doing, the status module must be included. This is achieved by ensuring the following lines in the file 'Configuration' are uncommented prior to compiling the source code
Rule STATUS=yes
Module status_module mod_status.o
and by the addition of lines similar to the following in the configuration file 'access.conf', which allows access to the URL http://'your server name here'/server-status from your domain only
<Location /server-status>
SetHandler server-status
order deny,allow
deny from all
allow from 'your domain name here'
</Location>
To enable the server to display its current configuration informtion and all included modules, the info module must be included. This is achieved by ensuring the following lines in the file 'Configuration' are uncommented prior to compiling the source code
Module info_module mod_info.o
and by the addition of lines similar to the following in the configuration file 'access.conf', which allows access to the URL http://'your server name here'/server-info from your domain only
<Location /server-info>
SetHandler server-info
order deny,allow
deny from all
allow from 'your domain name here'
</Location>