# --
# added for OTRS (http://otrs.org/)
# --

# agent, admin and customer frontend
ScriptAlias /otrs/ "/usr/local/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/usr/local/otrs/var/httpd/htdocs/"

# load all otrs modules
Perlrequire /usr/local/otrs/scripts/apache2-perl-startup.pl

# Apache::Reload - Reload Perl Modules when Changed on Disk
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec

# set mod_perl2 options
<Location /otrs>
#  ErrorDocument 403 /otrs/customer.pl
  AllowOverride None
  ErrorDocument 403 /otrs/index.pl
  SetHandler  perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
  PerlOptions +SetupEnv
  Order allow,deny
  Allow from all
</Location>

# directory settings
<Directory "/usr/local/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes
    DirectoryIndex  index.pl
    Order allow,deny
    Allow from all
</Directory>
<Directory "/usr/local/otrs/var/httpd/htdocs/">
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

# MaxRequestsPerChild (so no apache child will be to big!)
MaxRequestsPerChild 400
