Thank you Luc - 

My JkMount directives are inside an an included file, which is itself inside a 
<virtualhost> directive in httpd.conf, almost at the bottom of section 3.  Why 
wouldn't this work?  The idea was, if we decide to host more than one of these 
on the same system, we can put the JkMount directives inside the appropriate 
<virtualhost> in http.conf.  Also note, I lifted this arrangement right out of 
a working Apache 1.3 and Tomcat 3.3 setup.  

Here are the relevant sections of httpd.conf and my include file.  I 
substituted the string, "webname" for the real name of the site when it goes 
live:


[EMAIL PROTECTED] conf]# tail httpd.conf -c 1090

# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

NameVirtualHost webname.greg.local:80

#
# NOTE: NameVirtualHost cannot be used without a port specifier 
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

<VirtualHost webname.greg.local>
     ServerAdmin [EMAIL PROTECTED]
     DocumentRoot /var/www/html/webname/
###  ServerName www.webnamekids.org
     ServerName webname.greg.local
###  ServerAlias development.webnamekids.org staging.webnamekids.org
     include /etc/httpd/conf/webname.conf
</VirtualHost>




#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin [EMAIL PROTECTED]
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
[EMAIL PROTECTED] conf]# 

And here is the include file:

[EMAIL PROTECTED] conf]# more webname.conf
#
# www.webnamekids.com 
#
###SetEnvIf Remote_Addr 10\.10\.10\.78 BADIP

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
d

CustomLog "| /usr/sbin/rotatelogs /var/log/webname_access_log 259200" combin
ed env=!BADIP

###DocumentRoot /usr/local/websites/webname/
# Already setup in httpd.conf

##JkMount /servlets/* ajp13
##JkMount /*.jsp ajp13
##JkMount /*.do ajp13

##JkMount /servlets/* worker1
##JkMount /*.jsp worker1
##JkMount /*.do worker1

JkMount /var/www/html/webname/servlets/* worker1
JkMount /var/www/html/webname/*.jsp worker1
JkMount /var/www/html/webname/*.do worker1

#UserDir disabled

AddHandler server-parsed .html .shtml. htm

ErrorDocument 404 /notfound.html

#<Directory />
#    Options None
#    AllowOverride None
#</Directory>

# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.

<Directory /var/www/html/webname/>
    Options Indexes FollowSymLinks Includes
    AllowOverride All
    DirectoryIndex index.html index.shtml index.jsp
</Directory>


# There have been reports of people trying to abuse an old bug from pre-1.1
# days.  This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging 
# script on phf.apache.org.  Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.

<Location /cgi-bin/phf*>
    deny from all
    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
</Location>

# You may place any other directories or locations you wish to have
# access information for after this one.

###########################################
[EMAIL PROTECTED] conf]# 


Thanks

- Greg Scott
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 13, 2005 7:40 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: Paths for JkMount

Hi,

I used relative path to mount files to Tomcat with the JkMount directive so I 
don't think your problem comes from that.

First. Be sure that :

 - Aliasses have been created in httpd.conf
 - Your JkMount directives are placed between section 2 
   And 3 of httpd.conf
 - Your JkMount directives are placed AFTER the Alias
   Directives

If that doesn't work, let us know.


Luc Boudreau
Université du Québec
Canada



-----Message d'origine-----
De : Greg Scott [mailto:[EMAIL PROTECTED]
Envoyé : 11 juin 2005 23:41
À : tomcat-user@jakarta.apache.org
Cc : [EMAIL PROTECTED]; Joan Kinnischtzke; Michael R Ponicki Objet : Paths for 
JkMount

Hello -

I am working on a proof of concept application, porting from tomcat 3.n and 
Apache 1.3 to Tomcat 5.5.9 and Apache 2.0.52. The problem - every time this app 
would try to execute a .jsp file, Apache would return an error.  After a bunch 
of troubleshooting in httpd.conf, I found the problem.  It was these JkMount 
directives:
 
        JkMount /servlets/* worker1
        JkMount /*.jsp worker1
        JkMount /*.do worker1

I was assuming these paths were all really relative to my DocumentRoot - but 
noooooo!  The path evidently needs to be a real, absolute path.

These directives work:

        JkMount /var/www/html/{approot}/servlets/* worker1
        JkMount /var/www/html/{approot}/*.jsp worker1
        JkMount /var/www/html/{approot}/*.do worker1

(where {approot} is the directory with all the html, jsp, and other
files.)

And now the app seems to behave properly.  

But this bothers me - aren't all these supposed to be relative to DocumentRoot? 
 Am I missing something or are JkMount directives supposed to point to an 
absolute path?

Thanks

- Greg Scott
  [EMAIL PROTECTED]

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


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

Reply via email to