# Tunned Apache http server for iMedia

#####################################
### Section 1: Global Environment ###
#####################################

### General options ###
ServerType standalone
ServerRoot "/etc/httpd"
LockFile /var/lock/httpd.lock
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/httpd.scoreboard
#ResourceConfig conf/srm.conf
#AccessConfig conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 50
KeepAliveTimeout 15
MinSpareServers 2
MaxSpareServers 4
StartServers 1
MaxClients 20
MaxRequestsPerChild 8

### Listen options ###
#Listen 3000
#Listen 12.34.56.78:80
Listen 80
#BindAddress *

### Modules ###
LoadModule env_module         modules/mod_env.so
LoadModule mime_module        modules/mod_mime.so
LoadModule autoindex_module   modules/mod_autoindex.so
LoadModule dir_module         modules/mod_dir.so
LoadModule cgi_module         modules/mod_cgi.so
LoadModule alias_module       modules/mod_alias.so
LoadModule access_module      modules/mod_access.so
LoadModule auth_module        modules/mod_auth.so

ClearModuleList
AddModule mod_env.c
AddModule mod_mime.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c


##############################################
### Section 2: 'Main' server configuration ###
##############################################

### General options ###
Port 80
User nobody
Group nobody
ServerAdmin root@localhost
ServerName localhost
#CacheNegotiatedDocs
UseCanonicalName On
HostnameLookups Off
ServerSignature On
DocumentRoot "/mediabox/webadmin/web-control"

### Index options ###
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.cgi
IndexOptions FancyIndexing
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

### .htaccess options ###
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

### Logging options ###
LogLevel debug
ErrorLog /etc/httpd/logs/error.log
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
#LogFormat "%h %l %u %t \"%r\" %>s %b" common
#LogFormat "%{Referer}i -> %U" referer
#LogFormat "%{User-agent}i" agent
#CustomLog /var/log/httpd/access_log common
#CustomLog /var/log/httpd/referer_log referer
#CustomLog /var/log/httpd/agent_log agent
#CustomLog /var/log/httpd/access_log

### MIME options ###
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile /usr/share/magic
</IfModule>

### File extension descriptions ###		     
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#ReadmeName README
#HeaderName HEADER

### Language options ###
AddLanguage en .en
#LanguagePriority en

### Handlers ###
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
#AddHandler send-as-is asis
AddHandler imap-file map
#AddHandler type-map var

### Meta information ###
#MetaDir .web
#MetaSuffix .meta

### Browser match paterns ###
#BrowserMatch "Mozilla/2" nokeepalive
#BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
#BrowserMatch "RealPlayer 4\.0" force-response-1.0
#BrowserMatch "Java/1\.0" force-response-1.0
#BrowserMatch "JDK/1\.0" force-response-1.0

## Directories ###
#<Directory />
#    AllowOverride None
#    Options FollowSymLinks
#</Directory>

<Directory "/mediabox/webadmin/web-control">
    AllowOverride All
    Allow from all
    DirectoryIndex index.html
    Options Indexes Includes FollowSymLinks
</Directory>

Alias /mediabox/ "/mediabox/webadmin/web-control"

<Directory "/mediabox/webadmin/web-control/html">
    AllowOverride All
    Allow from all    
    Options Indexes Includes FollowSymLinks
    Order allow,deny
</Directory>

<Directory "/mediabox/webadmin/web-control/cgi-bin">
    AllowOverride All
    Allow from all    
    Options ExecCGI
    Order allow,deny
    Addhandler cgi-script .pl
</Directory>

<Directory "/mediabox/webadmin/web-control/content">
    AllowOverride All
    Allow from all    
    IndexOptions FancyIndexing
    Options Indexes Includes FollowSymLinks
    Order allow,deny
</Directory>
