# Change manually:
#   -- Change '127.0.0.1' to your IP address
#   -- Change 'webmaster@mycompany.com' to your contact e-mail address
#   -- Change 'www.mycompany.com' to your website hostname
#   -- If you wish to run the mod_perl server on a port other than 8080, change it

# If you're using Named virtual hosts, just remove the 'Listen' line

Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
Port 8080
ServerAdmin webmaster@mycompany.com
ServerName www.mycompany.com
DocumentRoot %%WEBSITE_DIR%%/html

CustomLog %%WEBSITE_DIR%%/logs/access_log_modperl combined
ErrorLog  %%WEBSITE_DIR%%/logs/error_log_modperl

# This is necessary so we can bring in the Stash Class properly

<Perl>
 use lib qw( %%WEBSITE_DIR%% );
</Perl>

# This reads in all your SPOPS objects, sets up aliases, database
# handles, template processing objects, etc.

PerlRequire %%WEBSITE_DIR%%/conf/startup.pl

# Uncomment the following line only on a development server

# PerlInitHandler Apache::StatINC

# This is used to read the 'X-Forwarded-For' header created by the
# mod_proxy_add_forward.c Apache module that should be compiled into
# your front-end proxy server. If you don't have this, then every
# request will appear to come from the proxy server, which can be
# annoying.

PerlPostReadRequestHandler OpenInteract::ProxyRemoteAddr

# This sends all incoming requests to the OpenInteract Apache content
# handler which is found in the 'base' package

<Location /> 
    SetHandler perl-script 
    PerlSetVar  StashClass      %%STASH_CLASS%%
    PerlHandler OpenInteract
</Location>

# If you're running OpenInteract/mod_perl on its own (no proxy
# server), uncomment the next directive so that mod_perl won't spend
# its time dealing with images

#<Location /images>
#    SetHandler default-handler
#</Location>

</VirtualHost>
