# 
# mod_perl configuration file
# 

# The following options should not be changed:
ServerType              standalone
ServerRoot              "/var/home/slowtwitch/slowtwitch.com"
PidFile                 /var/home/slowtwitch/slowtwitch.com/logs/modperl.pid
ScoreBoardFile          /var/home/slowtwitch/slowtwitch.com/logs/modperl.scoreboard
DocumentRoot            /var/home/slowtwitch/slowtwitch.com/www
ResourceConfig          /dev/null
AccessConfig            /dev/null
Timeout                 1200

# Set the user/group apache is going to run as.
User                    slowtwitch
Group                   slowtwitch

# Set proc limits
RLimitCPU               600
RLimitMEM               157286400


# KeepAlive should _not_ be on since this is running behind
# a proxy.
KeepAlive               Off

# You must leave the port alone in order for /perl/ to
# be proxied properly.
Port                    8002
Listen                  127.0.0.1:8002

# Please do not adjust these settings, this server is running
# behind a proxy, and does not need a large number of clients
# active.
MinSpareServers         3
MaxSpareServers         5
StartServers            3
MaxClients              10
MaxRequestsPerChild     10000

# Below is a list of modules that will be loaded. If you add
# or remove any modules, you must edit the AddModule section
# below.

#LoadModule mmap_static_module /usr/lib/httpd/mod_mmap_static.so
#LoadModule vhost_alias_module /usr/lib/httpd/mod_vhost_alias.so
LoadModule env_module         /usr/lib/httpd/mod_env.so
LoadModule define_module      /usr/lib/httpd/mod_define.so
LoadModule config_log_module  /usr/lib/httpd/mod_log_config.so
#LoadModule agent_log_module   /usr/lib/httpd/mod_log_agent.so
#LoadModule referer_log_module /usr/lib/httpd/mod_log_referer.so
#LoadModule mime_magic_module  /usr/lib/httpd/mod_mime_magic.so
LoadModule mime_module        /usr/lib/httpd/mod_mime.so
LoadModule negotiation_module /usr/lib/httpd/mod_negotiation.so
LoadModule status_module      /usr/lib/httpd/mod_status.so
LoadModule info_module        /usr/lib/httpd/mod_info.so
LoadModule includes_module    /usr/lib/httpd/mod_include.so
LoadModule autoindex_module   /usr/lib/httpd/mod_autoindex.so
LoadModule dir_module         /usr/lib/httpd/mod_dir.so
LoadModule cgi_module         /usr/lib/httpd/mod_cgi.so
#LoadModule asis_module        /usr/lib/httpd/mod_asis.so
LoadModule imap_module        /usr/lib/httpd/mod_imap.so
LoadModule action_module      /usr/lib/httpd/mod_actions.so
#LoadModule speling_module     /usr/lib/httpd/mod_speling.so
LoadModule userdir_module     /usr/lib/httpd/mod_userdir.so
LoadModule alias_module       /usr/lib/httpd/mod_alias.so
LoadModule rewrite_module     /usr/lib/httpd/mod_rewrite.so
LoadModule access_module      /usr/lib/httpd/mod_access.so
LoadModule auth_module        /usr/lib/httpd/mod_auth.so
#LoadModule anon_auth_module   /usr/lib/httpd/mod_auth_anon.so
#LoadModule dbm_auth_module    /usr/lib/httpd/mod_auth_dbm.so
#LoadModule db_auth_module     /usr/lib/httpd/mod_auth_db.so
#LoadModule digest_module      /usr/lib/httpd/mod_digest.so
#LoadModule proxy_module       /usr/lib/httpd/libproxy.so
#LoadModule cern_meta_module   /usr/lib/httpd/mod_cern_meta.so
#LoadModule expires_module     /usr/lib/httpd/mod_expires.so
#LoadModule headers_module     /usr/lib/httpd/mod_headers.so
LoadModule usertrack_module   /usr/lib/httpd/mod_usertrack.so
#LoadModule example_module     /usr/lib/httpd/mod_example.so
#LoadModule unique_id_module   /usr/lib/httpd/mod_unique_id.so
LoadModule setenvif_module    /usr/lib/httpd/mod_setenvif.so
#LoadModule ssl_module         /usr/lib/httpd/libssl.so
LoadModule perl_module        /usr/lib/httpd/libperl.so
#LoadModule php4_module        /usr/lib/httpd/libphp4.so
#LoadModule gzip_module        /usr/lib/httpd/mod_gzip.so
#LoadModule throttle_module    /usr/lib/httpd/mod_throttle.so

# This list below must correspond with the list of modules you have 
# enabled above.

ClearModuleList
#AddModule mod_mmap_static.c
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_define.c
AddModule mod_log_config.c
#AddModule mod_log_agent.c
#AddModule mod_log_referer.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
#AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
#AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_db.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_expires.c
#AddModule mod_headers.c
AddModule mod_usertrack.c
#AddModule mod_example.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
#AddModule mod_ssl.c
AddModule mod_perl.c
#AddModule mod_php4.c
#AddModule mod_gzip.c
#AddModule mod_throttle.c

# Section 2: Main Server Configuration
ServerAdmin             webmaster@slowtwitch.com
ServerName              slowtwitch.com
UseCanonicalName        Off

DirectoryIndex          index.html index.htm default.htm index.shtm index.shtml index.cgi index.php 
AccessFileName          .htaccess
TypesConfig             /var/home/slowtwitch/slowtwitch.com/modperl.mime_types
DefaultType             text/plain
ExtendedStatus          Off
ServerSignature         Off
ServerTokens            ProductOnly

# Do not enable hostname lookups, ip's will be looked up nightly 
# and will be replaced with the hostname in the log files.
HostnameLookups         Off

# Logging Directives
LogLevel                warn
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/home/slowtwitch/slowtwitch.com/logs/perl_access_log combined
ErrorLog                /var/home/slowtwitch/slowtwitch.com/logs/perl_error_log

# Default Handlers
AddType    text/html     .shtm .shtml
AddHandler cgi-script    .cgi
AddHandler server-parsed .htm .html .shtm .shtml 
AddHandler send-as-is    asis
AddHandler imap-file     map

# Root Filesystem
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

# Document Root
<Directory /var/home/slowtwitch/slowtwitch.com/>
    Options All -Indexes
    AllowOverride All
</Directory>

# No ~user allowed.
<IfModule mod_userdir.c>
    UserDir disabled
</IfModule>

# Disallow any attempts at viewing .ht* files
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

# Setup /icons/ alias    
Alias /icons/ /var/httpd/icons/
<Location /icons/>
    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Location>

# View server status information
<Location /server-status>
    # Protect this information from prying eyes
    AuthType Basic
    AuthName Protected
    AuthUserFile /home/slowtwitch/.gpanel/status_htpasswd
    require valid-user

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
</Location>

# View perl info
<Location /perl-status>
    # Protect this information from prying eyes
    AuthType Basic
    AuthName Protected
    AuthUserFile /home/slowtwitch/.gpanel/status_htpasswd
    require valid-user

    SetHandler perl-script
    PerlHandler Apache::Status
    Order deny,allow
    Deny from all
    Allow from localhost
</Location>
    
# Directory Indexing and Content Negotiation Options
IndexOptions            FancyIndexing
AddIconByEncoding       (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType           (TXT,/icons/text.gif) text/*
AddIconByType           (IMG,/icons/image2.gif) image/*
AddIconByType           (SND,/icons/sound2.gif) audio/*
AddIconByType           (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage zh-tw .tw
AddLanguage tw .tw
AddCharset Big5         .Big5    .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866        .cp866
AddCharset ISO-8859-5   .iso-ru
AddCharset KOI8-R       .koi8-r
AddCharset UCS-2        .ucs2
AddCharset UCS-4        .ucs4
AddCharset UTF-8        .utf8
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
AddType application/x-tar .tgz

# Load the mod_perl startup file, and setup the mod_perl handler so that
# the ip address is updated for all requests.
PerlRequire /var/home/slowtwitch/slowtwitch.com/modperl_startup.pl
PerlPostReadRequestHandler My::ProxyRemoteAddr

# By default only scripts in /perl/ are executed under mod_perl.
Alias /perl/ /var/home/slowtwitch/slowtwitch.com/perl/
<Directory /var/home/slowtwitch/slowtwitch.com/perl/>
    Order Allow,Deny
    Allow From All
    AllowOverride All
    Options +ExecCGI 
    
    SetHandler perl-script
    PerlHandler Apache::Registry
    PerlSendHeader On
</Directory>

# If you want your /cgi-bin/ to be run under mod_perl, uncomment
# the following:
Alias /cgi-bin/ /var/home/slowtwitch/slowtwitch.com/cgi-bin/
<Directory /var/home/slowtwitch/slowtwitch.com/cgi-bin/>
    Order Allow,Deny
    Allow From All
    AllowOverride All
    Options +ExecCGI 
    
    SetHandler perl-script
    PerlHandler Apache::Registry
    PerlSendHeader On
</Directory>

# vim:syn=apache:sw=4:et


