tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Cochrane <andr...@colorsolutions.com.au>
Subject First attempt at mod_jk
Date Fri, 29 Jun 2001 03:12:24 GMT
Hi all,

Tomcat 3.2.2, Apache 1.3.19 Debian 2.4.5

Trying to setup virtual hosts html is working jsp is working but giving me
the same error...

Error: 500

Location: /examples/jsp/num/numguess.jsp
Internal Servlet Error:

java.lang.NullPointerException
    at org.apache.tomcat.util.FileUtil.isAbsolute(FileUtil.java)
    at org.apache.tomcat.core.Context.getAbsolutePath(Context.java)
    at org.apache.tomcat.core.Context.getRealPath(Context.java)
    at 
org.apache.tomcat.facade.ServletContextFacade.getRealPath(ServletContextFaca
de.java)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java)
    at org.apache.tomcat.core.Handler.service(Handler.java)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java)
    at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java)
    at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java)
    at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
    at java.lang.Thread.run(Thread.java:484)

I have edited httpd.conf for the virtual hosts and server.xml, do I need to
add anything in workers.properties? I was using mod_jserv with tomcat 3.1
and had virtual hosts going but no more...

I used to have to create a .xml file for each virtual host as far as I can
see this isn't necessary?!?!

Extract of httpd.conf (IP and hostname changed for privacy)

#Mounting the first Virtual Host www.vhost1.com.au Ajp13
<VirtualHost 111.111.111.111>
ServerName www.vhost1.com.au
DocumentRoot /home/web/vhost1.com.au
ScriptAlias /cgi-bin/ /home/web/vhost1.com.au/cgi-bin/
Alias /vhost1.com.au /home/web/vhost1.com.au
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
<Directory "/home/web/vhost1.com.au">
        Options Indexes FollowSymLinks
                Order deny,allow
                Allow from all
</Directory>
</VirtualHost>

#Mounting the second Virtual Host www.vhost2.com.au Ajp13
<VirtualHost 111.111.111.111>
ServerName www.vhost2.com.au
DocumentRoot /home/web/vhost2.com.au
ScriptAlias /cgi-bin/ /home/web/vhost2.com.au/cgi-bin/
Alias /vhost2.com.au /home/web/vhost2.com.au
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
<Directory "/home/web/vhost2.com.au">
        Options Indexes FollowSymLinks
                Order deny,allow
                Allow from all
</Directory>
</VirtualHost>

# The following line is for apacheconfig - DO NOT REMOVE!
<IfModule mod_jk.c>
JkWorkersFile /etc/apache/mod_jk/workers.properties
Include /etc/apache/mod_jk/tomcat-auto
</IfModule>

Extract of server.xml
<!-- Apache AJP13 support. Added by Andrew Cochrane 29/06/01. As per
         tomcat instructions. -->
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
          <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
          <Parameter name="port" value="8009"/>
        </Connector>
<Host name="www.vhost1.com.au">
                <Context path="" docbase="/home/web/vhost1.com.au"
debug="0"/>
        </Host>

        <Host name="www.vhost2.com.au">
                <Context path="" docbase="/home/web/vhost2.com.au"
debug="0"/>
        </Host>

Thanks for your help in advance
 
========================================
Andrew Cochrane
Manager - Information Technology & Systems

Color Solutions Australia
171 Bank Street
South Melbourne, 3205
Australia
Tel: +61 3 9699 8255
Fax: +61 3 9699 7197
ISDN: +61 3 9682 3576
BBS: +61 3 9692 2995
Email: andrewc@colorsolutions.com.au
Web: www.colorsolutions.com.au

The information contained in this e-mail is confidential and intended only
for the person(s) to whom it is addressed. Recipients other than those
intended may not copy, use, disclose or further communicate its contents and
are asked to please inform the sender of their error and to immediately and
completely delete the original and any copies from their machines.
Thankyou.


Mime
View raw message