##
## httpd.conf -- Apache HTTP server configuration file
##

### Section 1: Global Environment
ServerType standalone
ServerRoot /etc/apache
LockFile /var/lock/apache.lock
PidFile /var/run/apache.pid
ScoreBoardFile /var/run/apache.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 10
MinSpareServers 5
MaxSpareServers 5
StartServers 5
MaxClients 100
MaxRequestsPerChild 1000

# Dynamic Shared Object (DSO) Support
# Please keep this LoadModule: line here, it is needed for installation.
#
# LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
# LoadModule env_module /usr/lib/apache/1.3/mod_env.so
LoadModule config_log_module /usr/lib/apache/1.3/mod_log_config.so
LoadModule mime_magic_module /usr/lib/apache/1.3/mod_mime_magic.so
LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so
LoadModule negotiation_module /usr/lib/apache/1.3/mod_negotiation.so
#LoadModule status_module /usr/lib/apache/1.3/mod_status.so
# LoadModule info_module /usr/lib/apache/1.3/mod_info.so
# LoadModule includes_module /usr/lib/apache/1.3/mod_include.so
#LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so
LoadModule dir_module /usr/lib/apache/1.3/mod_dir.so
LoadModule cgi_module /usr/lib/apache/1.3/mod_cgi.so
# LoadModule asis_module /usr/lib/apache/1.3/mod_asis.so
# LoadModule imap_module /usr/lib/apache/1.3/mod_imap.so
# LoadModule action_module /usr/lib/apache/1.3/mod_actions.so
# LoadModule speling_module /usr/lib/apache/1.3/mod_speling.so
# LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so
LoadModule alias_module /usr/lib/apache/1.3/mod_alias.so
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
# LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so
# LoadModule anon_auth_module /usr/lib/apache/1.3/mod_auth_anon.so
# LoadModule dbm_auth_module /usr/lib/apache/1.3/mod_auth_dbm.so
# LoadModule db_auth_module /usr/lib/apache/1.3/mod_auth_db.so
# LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
# LoadModule digest_module /usr/lib/apache/1.3/mod_digest.so
# LoadModule cern_meta_module /usr/lib/apache/1.3/mod_cern_meta.so
LoadModule expires_module /usr/lib/apache/1.3/mod_expires.so
# LoadModule headers_module /usr/lib/apache/1.3/mod_headers.so
# LoadModule usertrack_module /usr/lib/apache/1.3/mod_usertrack.so
#LoadModule unique_id_module /usr/lib/apache/1.3/mod_unique_id.so
LoadModule setenvif_module /usr/lib/apache/1.3/mod_setenvif.so
# LoadModule sys_auth_module /usr/lib/apache/1.3/mod_auth_sys.so
# LoadModule put_module /usr/lib/apache/1.3/mod_put.so
# LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so
# LoadModule throttle_module /usr/lib/apache/1.3/mod_throttle.so
# LoadModule allowdev_module /usr/lib/apache/1.3/mod_allowdev.so
# LoadModule eaccess_module /usr/lib/apache/1.3/mod_eaccess.so
LoadModule fastcgi_module /usr/lib/apache/1.3/mod_fastcgi.so
# LoadModule roaming_module /usr/lib/apache/1.3/mod_roaming.so
LoadModule gzip_module /usr/lib/apache/1.3/mod_gzip.so
# LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so

### Section 2: 'Main' server configuration
Port 80
User www-data
Group www-data
ServerAdmin likwoka@yahoo.com
ServerName localhost
DocumentRoot /home/ak/www

###
# Options may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
<Directory />
    Options SymLinksIfOwnerMatch
    AllowOverride None
</Directory>

<Directory /home/ak/www/>
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<Directory /home/ak/www/cm/>
	Options Indexes ExecCGI
	AllowOverride none
	Order allow,deny
	Allow from all
</Directory>

<IfModule mod_fastcgi.c>
# Without this, the default of dynamic application will be used.
    FastCgiServer /home/ak/www/cm/index.fcgi -processes 1
</IfModule>

<IfModule mod_dir.c>
    DirectoryIndex index.html index.fcgi index.cgi
</IfModule>

<IfModule mod_ssl.c>
	Listen 80
	Listen 443
	AddType application/x-x509-ca-cert .crt
	AddType application/x-pkcs7-crl .crl
	SSLMutex file:/var/run/ssl_mutex
	SSLSessionCache dbm:/var/run/ssl_scache
	SSLSessionCacheTimeout 300
	SSLRandomSeed startup file:/dev/urandom 512
	SSLRandomSeed connect file:/dev/urandom 512
	SSLLog /var/log/apache/ssl_engine_log
	SSLLogLevel info
</IfModule>

#CacheNegotiatedDocs
UseCanonicalName On
TypesConfig /etc/mime.types
DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile share/magic
</IfModule>

HostnameLookups Off

###
# Note that Log files are now rotated by logrotate, not by apache itself.
# This means that apache no longer attempts to magically determine
# where your log files are kept; you have to fill out stanzas in
# /etc/logrotate.d/apache yourself.
ErrorLog /var/log/apache/error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %v" full
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %P %T" debug
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/apache/access.log common
#CustomLog /var/log/apache/referer.log referer
#CustomLog /var/log/apache/agent.log agent
CustomLog /var/log/apache/access.log combined
ServerSignature On

<IfModule mod_mime.c>
    # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+)
    # uncompress information on the fly. Note: Not all browsers support
    # this.  Despite the name similarity, the following Add* directives
    # have nothing to do with the FancyIndexing customization
    # directives above.
    AddEncoding x-compress Z
    AddEncoding x-gzip gz tgz

    AddLanguage en .en
    <IfModule mod_negotiation.c>
        LanguagePriority en
    </IfModule>

    # AddType allows you to tweak mime.types without actually editing
    # it, or to make certain files to be certain types.
    #
    AddType application/x-tar .tgz
    AddType image/bmp .bmp

    # AddHandler allows you to map certain file extensions to "handlers",
    # actions unrelated to filetype. These can be either built into
    # the server or added with the Action command (see below).
    #
    # If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    #AddHandler cgi-script .cgi
    AddHandler fastcgi-script .fcgi

    # Uncomment the following line to enable Apache's send-asis HTTP
    # file feature.
    #AddHandler send-as-is asis

    # If you wish to use server-parsed imagemap files, use
    #AddHandler imap-file map

    # To enable type maps, you might want to use
    #AddHandler type-map var
</IfModule>

# Default charset to iso-8859-1 (ttp://www.apache.org/info/css-security/).
AddDefaultCharset on

<IfModule mod_setenvif.c>
    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
</IfModule>

<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^/cm$ /cm/ [redirect=permanent]
	RewriteRule ^/cm(/.*) /cm/index.fcgi$1 [last]
</IfModule>

