tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: http status 404 - /examples/jsp/
Date Mon, 21 Apr 2003 18:31:12 GMT

Your mod_jk.conf is incomplete.

It's missing all of this:

JkMount /examples/jsp/security/protected/j_security_check ajp13
JkMount /examples/CompressionTest ajp13
JkMount /examples/SendMailServlet ajp13
JkMount /examples/servletToJsp ajp13
JkMount /examples/snoop ajp13
JkMount /examples/*.jsp ajp13
JkMount /examples/servlet/* ajp13

...and possibly some other stuff.

I would recheck the position of the ApacheConfig Listener elements in 
server.xml.  Use http://www.johnturner.com/howto/mod_jk_conf.html to 
double-check your generated mod_jk.conf file.

Regarding your hostname question, a URL with localhost in the URL will only 
work from the same machine that is running the actual web server.  If you 
are trying to access Apache + Tomcat from a machine that is not running 
Apache and Tomcat, then you will need to use a FQDN, not localhost.  In 
that scenario, just duplicate the setup you have for localhost, or else 
replace "localhost" with the FQDN you want to use, except for 
workers.properties.

John

On Mon, 21 Apr 2003 13:54:18 -0400, Qing Xie <xie@ecopiabio.com> wrote:

> contents of mod_jk.conf
>
> ########## Auto generated on Mon Apr 21 13:43:22 EDT 2003##########
>
> <IfModule !mod_jk.c>
> LoadModule jk_module /opt/apache/modules/mod_jk.so
> </IfModule>
>
> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>
> JkLogLevel emerg
>
>
>
> <VirtualHost localhost>
> ServerName localhost
>
> #################### localhost:/admin ####################
>
> # Static files
> Alias /admin "/usr/java/tomcat/webapps/../server/webapps/admin"
>
> <Directory "/usr/java/tomcat/webapps/../server/webapps/admin">
> Options Indexes FollowSymLinks
> DirectoryIndex index.html index.htm index.jsp
> </Directory>
>
>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/admin/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/admin/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> JkMount /admin/j_security_check  ajp13
> JkMount /admin/*.do  ajp13
> JkMount /admin/*.jsp  ajp13
>
> #################### localhost:/webdav ####################
>
> # Static files
> Alias /webdav "/usr/java/tomcat/webapps/webdav"
>
> <Directory "/usr/java/tomcat/webapps/webdav">
> Options Indexes FollowSymLinks
> DirectoryIndex index.jsp index.html index.htm
> </Directory>
>
>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/webdav/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/webdav/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> JkMount /webdav/*.jsp  ajp13
>
> #################### localhost:/examples ####################
>
> # Static files
> Alias /examples "/usr/java/tomcat/webapps/examples"
>
> <Directory "/usr/java/tomcat/webapps/examples">
> Options Indexes FollowSymLinks
> </Directory>
>
>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/examples/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/examples/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>
> #################### localhost:/tomcat-docs ####################
>
> # Static files
> Alias /tomcat-docs "/usr/java/tomcat/webapps/tomcat-docs"
>
> <Directory "/usr/java/tomcat/webapps/tomcat-docs">
> Options Indexes FollowSymLinks
> DirectoryIndex index.html index.htm index.jsp
> </Directory>
>
>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/tomcat-docs/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/tomcat-docs/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> JkMount /tomcat-docs/*.jsp  ajp13
>
> #################### localhost:/manager ####################
>
> # Static files
> Alias /manager "/usr/java/tomcat/webapps/../server/webapps/manager"
>
> <Directory "/usr/java/tomcat/webapps/../server/webapps/manager">
> Options Indexes FollowSymLinks
> DirectoryIndex index.html index.htm index.jsp
> </Directory>
>
>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/manager/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/manager/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> JkMount /manager/html/*  ajp13
> JkMount /manager/*  ajp13
> JkMount /manager/*.jsp  ajp13
> </VirtualHost>
>
>
> ****************************************************************
> contents of workers.properties:
>
> # BEGIN workers.properties
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
> # END workers.properties
>
> ****************************************************************
>
>
> PS. The default envirnment has a variable "HOSTNAME=life.ecopiabio.com", 
> but in all tomcat and apache conf files, I used "localhost" as host name. 
> I can only access http:life.ecopiabio.com and 
> http:life.ecopiabio.com:8080, not http:localhost and http:localhost:8080. 
> Am I doing anything wrong?
>
> Thanks a lot,
>
> Qing
>
> John Turner wrote:
>
>>
>> I would suggest posting your mod_jk.conf file, and your 
>> workers.properties file.
>>
>> John
>>
>> On Mon, 21 Apr 2003 11:46:41 -0400, Qing Xie <xie@ecopiabio.com> wrote:
>>
>>> Hi John,
>>>
>>> I removed the "LoadModule" line and restarted apache. But when I tried 
>>> to access //localhost/index.jsp, I still got "not found" error. It also 
>>> showed "Apache/2.0.44 (Unix) mod_jk/1.2.2 Server at localhost Port 80" 
>>> at the bottom.  I checked apache error log, it says "[Mon Apr 21 
>>> 11:32:26 2003] [error] [client 192.168.1.212] File does not exist: 
>>> */opt/apache/htdocs/index.jsp*". Seems the connector doesn't work 
>>> because apache looked at the wrong directory.
>>>
>>> I don't have any clues because I followed your HOWTO so carefully.
>>>
>>> Thank you.
>>>
>>> Qing
>>>
>>> John Turner wrote:
>>>
>>>>
>>>> You don't need the LoadModule...it is included in the mod_jk.conf 
>>>> file, so as it stands you are doing it twice.  Not sure if that will 
>>>> cause problems or not.
>>>>
>>>> John
>>>>
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message