Hi Heather -

I didn't see a reply to your post, so here goes.

The JkMounts you have will be handled by the <Context> that has path="". If you didn't edit server.xml, that means it will go to the ROOT directory. If you want oecon-stprg to be the default <Context>, edit it's path in server.xml and set that to "" - just comment out the other one, since you really don't need it.

If that doesn't help, email me off the list.

Regards,

Lajos
galatea.com

Heather Buch wrote:
Hello,

My NameVirtualHost fails when I try to set the JkMount directives.

I am using
httpd-2.0.43
jakarta-tomcat-4.1.12
(I am also using jakarta-struts-1.0.2, but this might not be so relevant to my
problem)

Here is my setup (I describe the problem at the end using the specific names
that appear in the config file snippets below):

1. in /etc/hosts:

 # Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
127.0.0.1               oecon-stprg
127.0.0.1               oecon-admprg
12.38.84.60             heather

2. In httpd.conf:

NameVirtualHost 127.0.0.1

Here is my "catch all" localhost virtual host:

<VirtualHost 127.0.0.1>
ServerAdmin [EMAIL PROTECTED]
ServerAlias localhost.localdomain localhost
DocumentRoot "/usr/local/bin/server-1.0/apache2/htdocs"
ServerName localhost
ErrorLog logs/localhost_error.log
CustomLog logs/localhost_access.log common
</VirtualHost>

3. in mod_jk.conf-local

Here is the virtual host that I am trying to work with:

<VirtualHost 127.0.0.1>
DocumentRoot
"/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg/"
ServerName oecon-stprg
ServerAlias oecon-stprg
ServerAdmin [EMAIL PROTECTED]

# Deny direct access to WEB-INF and META-INF
<Location "WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "META-INF/*">
AllowOverride None
deny from all
</Location>
<Directory "/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg">
Options Indexes FollowSymLinks
order allow,deny
allow from all
DirectoryIndex login.jsp </Directory>


JkMount /*.do ajp13
JkMount /servlet/*.jsp ajp13
JkMount /*.jsp ajp13

#ErrorLog logs/oecon-stprg_error.log
#CustomLog logs/oecon-stprg_access.log common
</VirtualHost>


----------------------


The problem is - when I call up my virtual host url (http://oecon-stprg) and
comment out the JkMount directives, apache gives me the proper document root
("/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg/") but
of course then Tomcat can't handle jsp pages because there are no JkMount
directives. When I uncomment the JkMounts and call up my virtual host, Apache
does not send me to the DocumentRoot that I have defined in my oecon-stprg
VirtualHost, but instead to the default tomcat webapp.

In other words, the presence of this in my VirtualHost block:

JkMount /*.do ajp13
JkMount /servlet/*.jsp ajp13
JkMount /*.jsp ajp13

causes Apache to deliver the files under here:

/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/ROOT

intead of the ones under here:

/usr/local/bin/server-1.0/jakarta-tomcat-4.1.12/webapps/oecon-stprg

I hope I have explained this well enough to get a reply. I have struggled for
two days now. I read the document at
http://www.galatea.com/flashguides/virtual-hosting.xml as I generally think
the Galatea guides are very good. However, it describes setting up the
JkMounts under a subdirectory, for example,

JkMount /test ajp13
JkMount /test/* ajp13

and not at the root, as I would like to do. I want to be able to call up

http://oecon-stprg/login.jsp

not

http://oecon-stprg/test/login.jsp

but maybe I need that subdirectory?

Thanks very much in advance,

Heather Buch


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--



                   Lajos Moczar
      ----------------------------------------
    Open Source Support, Consulting and Training
      ----------------------------------------
            Cocoon Developer's Handbook
 (www.amazon.com/exec/obidos/tg/detail/-/0672322579)

                   _      _____
                  / \         /
                 /___\      /
                /     \   /____

http://www.galatea.com -- powered by AzSSL


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to