##
## httpd.conf -- Default Apache HTTP server configuration file for ePortal
##
## Here present only important Apache directives!!! Do not use this file as 
## Apache config. First read and understand
#--------------------------------------------------------------------------
## $Revision: 3.3.4.2 $
## $Date: 2003/11/18 02:50:27 $
## $Id: httpd.conf,v 3.3.4.2 2003/11/18 02:50:27 ras Exp $
#--------------------------------------------------------------------------

# Make sure mod_perl handler is before mod_dir (if used)
AddModule mod_perl.c
AddModule mod_dir.c

# You may wrap the rest of config inside 
# <VirtualHost ...>
# </VirtualHost>
# directives


# Where is component root of ePortal
DocumentRoot /home/ePortal/comp_root

# ePortal uses index.htm as DirectoryIndex file
DirectoryIndex index.htm

# Using ON here may produce some strange results
UseCanonicalName Off

# This is recommended for mod_perl environment
MaxRequestsPerChild 100

# For Russian users: All ePortal files are in windows-1251 charset
AddDefaultCharset windows-1251

# Protect some files
<Files .ht*|*.mc>
    Order Deny,Allow
    Deny from all
</Files>


# Load Perl package of ePortal. 
# This also includes HTML::Mason and ePortal::AuthCookieHandler
PerlModule ePortal::Apache

# Make every request is handled with ePortal
<Location />
 SetHandler perl-script
 PerlHandler ePortal::Apache

 # ==== THIS CONFIGURATION SETTING IS OBSOLETE SINCE ePortal 4.2 =======
 # ==== REMOVE IT FROM YOUR httpd.conf =================================
 # User recognition system of ePortal
 #AuthType ePortal::AuthCookieHandler
 #AuthType ePortal
 #PerlFixupHandler ePortal::AuthCookieHandler->recognize_user
 # ==== END OF CODE TO REMOVE ==========================================
</Location>

# Configure database access
PerlSetVar ePortal_dbi_source "dbi:mysql:database=eportal;host=localhost;"
PerlSetVar ePortal_dbi_username root
PerlSetVar ePortal_dbi_password yourpassword

# ADMIN MODE. Set it ONCE during initial setup of ePortal then turn OFF on production server
PerlSetVar ePortal_admin_mode 1

# Configure HTML::Mason
#
# This is required if you have more than one component root
#PerlSetVar MasonCompRoot "eportal => /home/ePortal/comp_root"
#PerlAddVar MasonCompRoot "info => /home/other-stuff/info"

# Where HTML::Mason stores temporary files. 
# Create this directory and make it writable to Apache owher (usually httpd or nobody)
PerlSetVar MasonDataDir /var/mason-data

# Handle directory browsing with ePortal
PerlSetVar MasonDeclineDirs 0

# Important! ePortal uses non standard names for autohandler and dhandler
PerlSetVar MasonAutohandlerName 'autohandler.mc'
PerlSetVar MasonDhandlerName 'dhandler.mc'

# Do not convert cyrillic characters into &..;
PerlSetVar MasonEscapeFlags "h => \&HTML::Mason::Escapes::basic_html_escape"

# Images of ePortal are stored in another directory
Alias /images /home/ePortal/images

# Speed up images serving
<Location /images>
  SetHandler default-handler
</Location>
