tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qing Xie <...@ecopiabio.com>
Subject Re: http status 404 - /examples/jsp/
Date Mon, 21 Apr 2003 17:54:18 GMT
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
>>>
>>> On Thu, 17 Apr 2003 17:04:44 -0400, Qing Xie <xie@ecopiabio.com> wrote:
>>>
>>>> Hi John,
>>>>
>>>> Yes, I added the following to my httpd.conf file and restarted 
>>>> apache after I restarted tomcat:
>>>>
>>>> LoadModule jk_module modules/mod_jk.so
>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>>
>>>> I have also check another guide from Kevin Yank, and he didn't 
>>>> mention "LoadModule jk_module modules/mod_jk.so" should be added to 
>>>> httpd.conf.
>>>>
>>>> This happened even before I linked apache & tomcat. I could access 
>>>> the default localhost:8080/index.jsp page, but when I clicked on 
>>>> the links under examples, eg JSP, I got error 404.Also, the web 
>>>> server seems to hang when I clicked on "Tomcat Mamager".
>>>>
>>>> Qing
>>>>
>>>> John Turner wrote:
>>>>
>>>>>
>>>>> You shouldn't need to.  Sounds like your Apache isn't picking up 
>>>>> the auto-generated mod_jk.conf file.  Do you have the right 
>>>>> Include statement in httpd.conf?  Did you restart Apache so it 
>>>>> picks up the mod_jk.conf file?
>>>>>
>>>>> John
>>>>>
>>>>> On Thu, 17 Apr 2003 16:40:07 -0400, Qing Xie <xie@ecopiabio.com>

>>>>> wrote:
>>>>>
>>>>>> Hi John,
>>>>>>
>>>>>> Since I have already started re-installing the whole thing, I 
>>>>>> finally got pache  2.0.44 + tomcat 4.1.18 + mod_jk_2.0.43 linked

>>>>>> together. I could start tomcat without any problems and the 
>>>>>> mod_jk.conf file was generated under conf dir. I could access 
>>>>>> both localhost and localhost:8080, but when I tried to access 
>>>>>> localhost:8080/examples/jsp/, I got message "http 404, The 
>>>>>> requested resource (/examples/jsp/) is not available".
>>>>>>
>>>>>> I changed the host names in httpd.conf and server.xml to be the 
>>>>>> same. Should I change all the "localhost" in server.xml and 
>>>>>> workers.properties to the my real host name?
>>>>>>
>>>>>> Thank you again.
>>>>>>
>>>>>> Qing
>>>>>>
>>>>>>
>>>>>> John Turner wrote:
>>>>>>
>>>>>>>
>>>>>>> You don't need ApacheConfig.
>>>>>>>
>>>>>>> See the sample mod_jk.conf file that ApacheConfig would generate

>>>>>>> (for localhost) here:
>>>>>>>
>>>>>>> http://www.johnturner.com/howto/mod_jk_conf.html
>>>>>>>
>>>>>>> You can easily copy this file and modify it to meet your needs,

>>>>>>> and include it into Apache's httpd.conf file.
>>>>>>>
>>>>>>> John
>>>>>>>
>>>>>>> On Thu, 17 Apr 2003 14:45:30 -0400, Qing Xie <xie@ecopiabio.com>

>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi John,
>>>>>>>>
>>>>>>>> Thank you very much for your reply. I have reset my 
>>>>>>>> environment, defined only JAVA_HOME and CATALINA_HOME, added

>>>>>>>> them into PATH, didn't define CLASSPATH, but I still got
the 
>>>>>>>> same error when I started tomcat.
>>>>>>>>
>>>>>>>> I think the reason is that tomcat 4.1.2 include 
>>>>>>>> *tomcat-coyote.jar* instead *tomcat-jk.jar*, and 
>>>>>>>> org.apache.ajp.tomcat4.config.ApacheConfig is not in that
package.
>>>>>>>>
>>>>>>>> I have followed your HOW-TO carefully and the only defference

>>>>>>>> is the tomcat version and apache version: you have apache
 
>>>>>>>> 2.0.44 + tomcat 4.1.18, and I have apache 2.0.45 + tomcat
4.1.2 
>>>>>>>> (came with sun's WSDP1.1) .
>>>>>>>>
>>>>>>>> I plan to get apache  2.0.44 + tomcat 4.1.18 and try it allover

>>>>>>>> again.
>>>>>>>>
>>>>>>>> Thank you again.
>>>>>>>>
>>>>>>>> Qing
>>>>>>>>
>>>>>>>> John Turner wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> You're getting class not found errors because your classpath

>>>>>>>>> is messed up.
>>>>>>>>>
>>>>>>>>> There is no need to set CLASSPATH in Tomcat 4.1.x.  All
you 
>>>>>>>>> need to set is JAVA_HOME (to the location of your JDK)
and 
>>>>>>>>> CATALINA_HOME (to Tomcat's install root).
>>>>>>>>>
>>>>>>>>> Tomcat will figure out CLASSPATH from those two variables
all 
>>>>>>>>> on its own.  Don't explicitly define CLASSPATH.
>>>>>>>>>
>>>>>>>>> John
>>>>>>>>>
>>>>>>>>> On Thu, 17 Apr 2003 11:02:49 -0400, Qing Xie 
>>>>>>>>> <xie@ecopiabio.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi everyone,
>>>>>>>>>>
>>>>>>>>>> After I tried to link apache and tomcat, I got 
>>>>>>>>>> Catalina.start: java.lang.ClassNotFoundException:

>>>>>>>>>> org.apache.ajp.tomcat4.config.ApacheConfig when I
tried to 
>>>>>>>>>> start tomcat again. What I have done are:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 1. installed apache 2.0.45, WSDP1.1 which includes
tomcat 
>>>>>>>>>> 4.1.2, j2sdk 1.4.1_02  on linux. I have tested that
both 
>>>>>>>>>> apache and tomcat work fine separatly at port 80
and 8080 
>>>>>>>>>> respectly.
>>>>>>>>>> 2. installed mod_jk_2.0.43.so under apache/modules
>>>>>>>>>> 3. added the following to default server.xml after
Server and 
>>>>>>>>>> Host tags:
>>>>>>>>>>
>>>>>>>>>> <Listener 
>>>>>>>>>> className="org.apache.ajp.tomcat4.config.ApacheConfig"

>>>>>>>>>> modJk="/opt/apache/modules/mod_jk.so" jkDebug="info"

>>>>>>>>>> workersConfig="/usr/java/jwsdp-1.1/conf/jk/workers.properties"

>>>>>>>>>> jkLog="/usr/java/jwsdp-1.1/logs/mod_jk.log" />
>>>>>>>>>>
>>>>>>>>>> <Listener 
>>>>>>>>>> className="org.apache.ajp.tomcat4.config.ApacheConfig"
 
>>>>>>>>>> append="true" />
>>>>>>>>>>
>>>>>>>>>> 4. I have also changed CLASSPATH==/usr/java/jwsdp-

>>>>>>>>>> 1.1/bin/bootstrap.jar:/usr/java/j2sdk1.4.1_02/lib/tools.jar:/usr/java/jwsdp-

>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 1.1/common/lib/servlet.jar:/usr/java/jwsdp-1.1/bin/tomcat-

>>>>>>>>>> jni.jar:/usr/java/j2sdk1.4.1_02/lib/dt.jar:/usr/java/j2sdk1.4.1_02/lib/htmlconverter.jar:/usr/java/jwsdp-

>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 1.1/common/lib/commons-collections.jar:.
>>>>>>>>>>
>>>>>>>>>> 5. created workers.properties file
>>>>>>>>>>
>>>>>>>>>> 6. add "Include "/usr/java/jwsdp-1.1/conf/auto/mod_jk.conf"

>>>>>>>>>> to httpd.conf file.
>>>>>>>>>>
>>>>>>>>>> Then when I tried to start tomcat, I got classnotfound
error.
>>>>>>>>>>
>>>>>>>>>> Could any body help me? I have done a lot of searches
but 
>>>>>>>>>> couldn't find the solution. Thanks in advance.
>>>>>>>>>>
>>>>>>>>>> Qing
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------

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

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

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



---------------------------------------------------------------------
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