###############################################################################
#                     Apache JServ Configuration File                         #
###############################################################################

# Note: this file should be appended or included into your httpd.conf

# Tell Apache on win32 to load the Apache JServ communication module
# LoadModule jserv_module modules/ApacheModuleJServ.dll

# Tell Apache on Unix to load the Apache JServ communication module
# For shared object builds only!!!
# @LOAD_OR_NOT@LoadModule jserv_module @LIBEXECDIR@/mod_jserv.so
# LoadModule jserv_module libexec/mod_jserv.so


<IfModule mod_jserv.c>
# Do not edit! 
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel debug


### Change if you run tomcat on a different host
#ApJServDefaultHost localhost
ApJServDefaultPort 8008

### Add handler for jsp. Note that the tomcat-apache.conf file
# which is produced by tomcat has a typo: AddType test/jsp .jsp
#
AddType text/jsp .jsp
AddHandler jserv-servlet .jsp

#################### All jsp files will go to tomcat ####################

# JServ1.1.1 engine
ApJServLogFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/logs/mod_jserv.log
ApJServMount /servlets ajpv12://localhost:8007/jserv111

# the gimics to make the Apache work on the links in the for tomcat
# examles. The problem is that tomcat mounts directory
# /usr/local/apache_t3.1/tomcat/webapps/ROOT as: document root "/"
# as can be seen in server.xml:
#
# <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" >
# </Context>
#
# while for Apache the document root directory is:
#  /usr/local/apache_t3.1/htdocs
# as seen in httpd.conf:
#    DocumentRoot "/usr/local/apache_t3.1/htdocs"
# The /usr/local/apache_t3.1/tomcat/webapps directory is; 
# drwxr-xr-x   4 root     other        512 Jun 10 03:45 ROOT
# drwxr-xr-x   4 root     other        512 Jun 10 03:45 admin
# drwxr-xr-x   6 root     other        512 Jun 10 03:45 examples
# drwxr-xr-x   7 root     other        512 Jun 10 03:45 test
#
# and under /usr/local/apache_t3.1/tomcat/webapps/ROOT:
#
# drwxr-xr-x   3 root     other        512 Jun 10 03:45 WEB-INF
# drwxr-xr-x   3 root     other        512 Jun 10 03:45 docs
# -rw-r--r--   1 root     other       2520 Jun 10 03:45 index.html
# -rw-r--r--   1 root     other       1934 Jun 10 03:45 tomcat.gif
# 
# at the same time, there are links in these documents linke:
#    <a href="docs/api/overview-summary.html"> or
#    <a href="examples/jsp/">
# Everything works under tomcat, but will not work Apache.
# So, I added a mount point docs and ROOT in server.xml
# <Context path="/docs" docBase="webapps/ROOT/docs" debug="0"
#   reloadable="true" >
# </Context>
# <Context path="/ROOT" docBase="webapps/ROOT" debug="0"
#   reloadable="true" >
# </Context>
# 
#
# But now, the relative links called from, say /ROOT/index.html :
#    <a href="docs/api/overview-summary.html"> 
# become:
#    <A href="/ROOT/docs/api/overview-summary.html">
# which is fine, but 
#    <a href="examples/jsp/">
# becomes:
#    <a href="/ROOT/examples/jsp/">
# which is not fine, and /ROOT has to be chopped.
#


Alias /JSPGateway /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/JSPGateway
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/JSPGateway">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /JSPGateway ajpv12://localhost:8008/root
<Location /JSPGateway/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

# It is good to protect development stuff with passwords
#<Location /JSPGateway>
#AuthType Basic
#AuthName "For internal users only"
#AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
#AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
#AuthType Basic

#<Limit GET POST>
#require group demo
#</Limit>
#</Location>


Alias /docs /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/ROOT/docs
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/ROOT/docs">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /docs ajpv12://localhost:8008/root
<Location /docs/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

# It is good to protect development stuff with passwords
#<Location /docs>
#AuthType Basic
#AuthName "For internal users only"
#AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
#AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
#AuthType Basic

#<Limit GET POST>
#require group demo
#</Limit>
#</Location>


Alias /test /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/test
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/test">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /test ajpv12://localhost:8008/root
<Location /test/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

# It is good to protect development stuff with passwords
#<Location /test>
#AuthType Basic
#AuthName "For internal users only"
#AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
#AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
#AuthType Basic

#<Limit GET POST>
#require group demo
#</Limit>
#</Location>


Alias /admin /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/admin
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/admin">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /admin ajpv12://localhost:8008/root
<Location /admin/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

# It is good to protect development stuff with passwords
<Location /admin>
AuthType Basic
AuthName "For internal users only"
AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
AuthType Basic

<Limit GET POST>
require group demo
</Limit>
</Location>


Alias /ROOT /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/ROOT
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/build/tomcat/webapps/ROOT">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /ROOT ajpv12://localhost:8008/root
<Location /ROOT/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

# It is good to protect development stuff with passwords
#<Location /ROOT>
#AuthType Basic
#AuthName "For internal users only"
#AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
#AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
#AuthType Basic

#<Limit GET POST>
#require group demo
#</Limit>
#</Location>


Alias /SciPortal /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/WWW/SciPortal
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/WWW/SciPortal">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /SciPortal ajpv12://localhost:8008/root
<Location /SciPortal/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /GOW /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/WWW/GOW
<Directory "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/WWW/GOW">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /GOW ajpv12://localhost:8008/root
<Location /GOW/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /tmd /a/birch.csit.fsu.edu/shared/home/jake/tmd
<Directory "/a/birch.csit.fsu.edu/shared/home/jake/tmd">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /tmd ajpv12://localhost:8008/root
<Location /tmd/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

#It is good to protect development stuff with passwords
#<Location /SciPortal>
#AuthType Basic
#AuthName "For internal users only"
#AuthUserFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htpasswd
#AuthGroupFile /a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/auth/htgroup
#AuthType Basic

#<Limit GET POST>
#require group demo
#</Limit>
#</Location>

</IfModule>
