What URL generates a 404?

- I don't see a Context in server.xml for your webapp...do you have one, or
are you using ROOT?

- if Apache and Tomcat are on the same machine, I would change ".host" in
workers.properties to "localhost" instead of the domain name.  Not sure why,
but sometimes that makes a difference to mod_jk.

The auto-config option doesn't generate SSL directives.  If you want SSL to
work, you will have to stick in a "VirtualHost some.ip.address:443" block in
httpd.conf, and put the JkMount statements, etc in there.

HTH

John

> -----Original Message-----
> From: Helene Figueiredo [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 8:55 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Always with my configuration apache ssl + tomcat 
> on redhat
> 7. 2
> 
> 
> Hello,
> 
> Ok John, I've make a break, then take a step back and verify all my
> configuration files methodically. And I'm on a new situation :
> I have always my page 404 but my "mod_jk.conf" file are different now.
> I think it's now good because it's look like the example find in your
> url : http://www.johnturner.com/howto/mod_jk_conf.html
> 
> Please find again my configuration files :
> 
> My server.xml :
> 
> <Server port="8005" shutdown="SHUTDOWN" debug="0">
> 
> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> modJk="/local/apache/libexec/mod_jk.so" />
> 
>   <Service name="Tomcat-Standalone">
> 
> 
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>                 port="8080" minProcessors="5" maxProcessors="75"
>                 enableLookups="true" redirectPort="8443"
>                 acceptCount="100" debug="0" connectionTimeout="20000"
>                 useURIValidationHack="false" 
> disableUploadTimeout="true" />
> 
> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>                 port="8009" minProcessors="5" maxProcessors="75"
>                 acceptCount="10" debug="0"/>
> 
> <Engine name="Standalone" 
> defaultHost="crip-lxagal.ujf-grenoble.fr" debug="0">
> 
>        <!-- Define the default virtual host -->
>        <Host name="crip-lxagal.ujf-grenoble.fr" debug="0" 
> appBase="/local/apache/www/webapps"
>         unpackWARs="true" autoDeploy="true">
> 
> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> append="true" forwardAll="false"
> modJk="/local/apache/libexec/mod_jk.so"/>
> 
> My workers.properties :
> 
> # BEGIN workers.properties
> worker.list=ajp13
> worker.ajp13.port=8009
> # change this line to match apache ServerName and Host name 
> in server.xml
> worker.ajp13.host=crip-lxagal.ujf-grenoble.fr
> worker.ajp13.type=ajp13
> # END workers.properties
> 
> The mod_jk.conf auto generated :
> 
> ########## Auto generated on Thu Jan 30 10:16:03 CET 2003##########
> 
> <IfModule !mod_jk.c>
>    LoadModule jk_module /local/apache/libexec/mod_jk.so
> </IfModule>
> 
> JkWorkersFile 
> "/local/src/jakarta-tomcat-4.1.18/conf/jk/workers.properties"
> JkLogFile "/local/src/jakarta-tomcat-4.1.18/logs/mod_jk.log"
> 
> JkLogLevel emerg
> 
> <VirtualHost crip-lxagal.ujf-grenoble.fr>
>      ServerName crip-lxagal.ujf-grenoble.fr
> 
>      #################### crip-lxagal.ujf-grenoble.fr:/admin 
> ####################
> 
>      # Static files
>      Alias /admin "/local/apache/www/webapps/../server/webapps/admin"
> 
>      <Directory "/local/apache/www/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
> 
>      #################### crip-lxagal.ujf-grenoble.fr:/webdav 
> ####################
> 
>      # Static files
>      Alias /webdav 
> "/usr/local/src/jakarta-tomcat-4.1.18/webapps/webdav"
> 
>      <Directory "/usr/local/src/jakarta-tomcat-4.1.18/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
> 
>      #################### crip-lxagal.ujf-grenoble.fr:/examples 
> ####################
> 
>      # Static files
>      Alias /examples "/local/apache/www/webapps/examples"
> 
>      <Directory "/local/apache/www/webapps/examples">
>          Options Indexes FollowSymLinks
>          DirectoryIndex index.html index.htm index.jsp
>      </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
>      JkMount /examples/servlet/HelloWorldExample  ajp13
>      JkMount /examples/snoop  ajp13
>      JkMount /examples/servlet/*  ajp13
>      JkMount /examples/CompressionTest  ajp13
>      JkMount /examples/*.jsp  ajp13
>      JkMount /examples/servletToJsp  ajp13
>      JkMount /examples/SendMailServlet  ajp13
> 
> ....
> 
> </VirtualHost>
> 
> My httpsd.conf : I have no more virtual host in because
> they are generated in the mod_jk.conf.
> 
> Port 443
> Listen 443
> DocumentRoot /local/apache/www
> SSLRequireSSL
> SSLEnable
> Include /local/tomcat/conf/auto/mod_jk.conf
> 
> 
> With this configuration I have this below in catalina.out :
> 
> Jan 29, 2003 5:03:16 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.18
> Jan 29, 2003 5:03:29 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on port 8080
> 
> There is no running ajp13 listening .... and Jk ...
> 
> And when I try with the connector below :
> 
>      <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
>      <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>                 port="8009" minProcessors="5" maxProcessors="75"
>                 enableLookups="true" redirectPort="8443"
>                 acceptCount="10" debug="0" connectionTimeout="0"
>                 useURIValidationHack="false"
>                 
> protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
> 
> I have in the catalina.out :
> 
> Jan 30, 2003 10:16:03 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.18
> Jan 30, 2003 10:16:16 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on port 8080
> Jan 30, 2003 10:16:16 AM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Jan 30, 2003 10:16:16 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 
> time=3/132  
> config=/local/src/jakarta-tomcat-4.1.18/conf/jk2.properties
> 
> Do you have an idea ?
> 
> Thanks for your help.
> 
> Helene
> 
> 
> 
> 
> my advice is to take a step back, take
> a break, and then approach it step by step, methodically.
> A 10:56 23/01/2003 -0500, vous avez �crit :
> 
> >As before, Apache needs a JkMount statement to direct 
> requests to Tomcat.
> >Without a JkMount statement, Apache will try to serve the 
> request itself,
> >without directing the request to Tomcat.
> >
> >Each VirtualHost container in httpd.conf is distinct and separate.
> >"VirtualHost some.host.com:443" is NOT the same as "VirtualHost
> >some.host.com".  Thus, if you have something in one but not 
> the other, you
> >will see different behavior.
> >
> >Based on what you posted below, you have a JkMount for 
> /examples/servlet/*
> >in <VirtualHost crip-lxagal.ujf-grenoble.fr> BUT NOT in <VirtualHost
> >crip-lxagal.ujf-grenoble.fr:443>.  That means that for
> >crip-lxagal.ujf-grenoble.fr:443 there is no JkMount.  Without one, no
> >requests on port 443 (https) will be sent to Tomcat.
> >
> >If you want Tomcat to serve requests when the requests 
> originate on port
> >443, you need to put a JkMount statement within the
> >crip-lxagal.ujf-grenoble.fr:443 VirtualHost container and 
> restart Apache.
> >If you take this step by step, you will get it to work.
> >
> >To answer your other questions:
> >
> >1. the Listener elements calling ApacheConfig are only 
> necessary if you want
> >Tomcat to auto-generate Apache config information. They are 
> optional.  If
> >you do not want them, leave them out and edit httpd.conf by hand.
> >
> >2. in server.xml, you need a Host container for 
> crip-lxagal.ujf-grenoble.fr.
> >Right now you have one for localhost.  Without it, Tomcat will use
> >defaultHost and the default Context to try and serve your 
> request, which is
> >probably not what you want to happen.
> >
> >3.  Your second Listener element is in the wrong place, it 
> should be within
> >the Host container in server.xml, not within the Engine 
> container.  That is
> >why your mod_jk.conf file is incomplete.  For a complete example of a
> >mod_jk.conf file from a default Tomcat install, see
> >http://www.johnturner.com/howto/mod_jk_conf.html
> >
> >You only have bits and pieces here...my advice is to take a 
> step back, take
> >a break, and then approach it step by step, methodically.
> >
> >John
> >
> >
> > > -----Original Message-----
> > > From: Helene Figueiredo [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 23, 2003 10:37 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Always with my configuration apache ssl + tomcat on
> > > redhat 7.2
> > >
> > >
> > > Hello,
> > >
> > > I have read all the docs I could find in the web (thanks to
> > > John) and I
> > > have always
> > > a problem.
> > >
> > > When I start first tomcat, it's ok. Then I start apache 
> ssl, it's ok.
> > > But when I go to the url :
> > >
> > > https://...
> > >
> > > It tells me that the file does not exit.
> > > And the message in the error log of apache is :
> > >
> > > [Thu Jan 23 15:51:11 2003] [error] [client 152.77.1.237] File
> > > does not
> > > exist: 
> /local/apache/www/webapps/examples/servlet/HelloWorldExample
> > >
> > > I know what you can tell me : it's a problem of apache only.
> > > For me, I think
> > > that I've forget something in some file of configuration to
> > > connect apache
> > > ssl with
> > > tomcat.
> > >
> > > You will find below, what I put in my configuration files :
> > >
> > > httpsd.conf :
> > >
> > > <VirtualHost crip-lxagal.ujf-grenoble.fr:443>
> > > #<VirtualHost 152.77.1.215>
> > > #SSLDisable
> > > SSLEnable
> > > #DirectoryIndex index.php index.php3 index.cgi index.html
> > > Welcome.html
> > > Welcome.phtml
> > >
> > > DirectoryIndex index.html
> > >          <Directory "/local/apache/www">
> > >          Options FollowSymLinks Indexes
> > >          AllowOverride none
> > >          </Directory>
> > >
> > >
> > > </VirtualHost>
> > >
> > >
> > > Include /local/tomcat/conf/auto/mod_jk.conf
> > >
> > > #################### /examples ####################
> > >
> > > # Static files
> > > Alias /examples "/local/apache/www/webapps/examples"
> > >
> > > <Directory "/local/apache/www/webapps/examples">
> > > Options Indexes FollowSymLinks
> > > DirectoryIndex index.html index.htm index.jsp
> > > </Directory>
> > >
> > >
> > > JkMount /examples/*.jsp ajp13
> > > JkMount /examples/servlet/* ajp13
> > >
> > >
> > >
> > > In the server.xml :
> > >
> > > <Server port="8005" shutdown="SHUTDOWN" debug="0">
> > >
> > > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> > > modJk="/local/apache/libexec/mod_jk.so" />
> > >
> > > Are this 2 listener necessary ?
> > >
> > >   <Listener
> > > className="org.apache.catalina.mbeans.ServerLifecycleListener"
> > >              debug="0"/>
> > >    <Listener
> > > className="org.apache.catalina.mbeans.GlobalResourcesLifecycle
> > > Listener"
> > >              debug="0"/>
> > >
> > > I have a connector on port 8080 and a connector for ajp13 on
> > > port 8009 :
> > >
> > >      <Connector 
> className="org.apache.coyote.tomcat4.CoyoteConnector"
> > >                 port="8080" minProcessors="5" maxProcessors="75"
> > >                 enableLookups="true" redirectPort="8443"
> > >                 acceptCount="100" debug="0" 
> connectionTimeout="20000"
> > >                 useURIValidationHack="false"
> > > disableUploadTimeout="true" />
> > >
> > >
> > >      <!-- Define an AJP 1.3 Connector on port 8009 -->
> > >      <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
> > >                 port="8009" minProcessors="5" maxProcessors="75"
> > >                 acceptCount="10" debug="0"/>
> > >
> > > Is this below ok ?
> > >
> > >      <Engine name="Standalone"
> > > defaultHost="crip-lxagal.ujf-grenoble.fr"
> > > debug="0">
> > > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> > > append="true" forwardAll="false"
> > > modJk="/local/apache/libexec/mod_jk.so" />
> > >
> > >
> > > <!-- Define the default virtual host -->
> > > <Host name="localhost" debug="0" appBase="/local/apache/www"
> > > unpackWARs="true" autoDeploy="true">
> > >
> > >
> > > Here is my workers.properties : I first try with host = 
> crip-lxagal...
> > > and then with host = localhost.
> > >
> > > # BEGIN workers.properties
> > > worker.list=ajp13
> > > worker.ajp13.port=8009
> > > # change this line to match apache ServerName and Host name
> > > in server.xml
> > > worker.ajp13.host=localhost
> > > #worker.ajp13.host=crip-lxagal.ujf-grenoble.fr
> > > worker.ajp13.type=ajp13
> > > # END workers.properties
> > >
> > >
> > > Here is the conf of mod_jk.conf : it's a file auto-generated and
> > > I can't add anything else in because it's removed at the starting
> > > of tomcat. So I have put the "jkmount directives" in the 
> httpsd.conf.
> > >
> > > ########## Auto generated on Thu Jan 23 16:19:58 CET 
> 2003##########
> > >
> > > <IfModule !mod_jk.c>
> > >    LoadModule jk_module /local/apache/libexec/mod_jk.so
> > > </IfModule>
> > >
> > > JkWorkersFile "/local/tomcat/conf/jk/workers.properties"
> > > JkLogFile "/local/tomcat/logs/mod_jk.log"
> > >
> > > JkLogLevel emerg
> > >
> > >
> > > And finaly, I do a netstat that give me this informations :
> > >
> > > netstat -at
> > > Active Internet connections (servers and established)
> > > Proto Recv-Q Send-Q Local Address           Foreign Address
> > >       State
> > > tcp        0      0
> > > localhost:8005          *:*                     LISTEN
> > > tcp        0      0
> > > *:8009                  *:*                     LISTEN
> > > tcp        0      0 *:https                 *:*
> > >       LISTEN
> > >
> > > Does someone have any idea ?
> > >
> > > I don't know what trying now ?
> > >
> > > PS : here is a error that appears in localhost_log in the
> > > directory of tomcat :
> > >
> > > 2003-01-23 15:50:20 StandardHost[localhost]: Removing web
> > > application at
> > > context path /examples
> > > 2003-01-23 15:50:20 StandardHost[localhost]:
> > > ContainerBase.removeChild: stop:
> > > LifecycleException:  Container StandardContext[/examples] has
> > > not been started
> > >          at
> > > org.apache.catalina.core.StandardContext.stop(StandardContext.
> > > java:3643)
> > >          at
> > > org.apache.catalina.core.ContainerBase.removeChild(ContainerBa
> > > se.java:1036)
> > >          at
> > > org.apache.catalina.core.StandardHostDeployer.remove(StandardH
> > > ostDeployer.java:420)
> > >          at
> > > 
> org.apache.catalina.core.StandardHost.remove(StandardHost.java:852)
> > >          at
> > > org.apache.catalina.startup.HostConfig.undeployApps(HostConfig
> > > .java:919)
> > >          at
> > > org.apache.catalina.startup.HostConfig.stop(HostConfig.java:899)
> > >          at
> > > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConf
> > > ig.java:370)
> > >          at
> > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
> > > ifecycleSupport.java:166)
> > >          at
> > > 
> org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1221)
> > >          at
> > > 
> org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1233)
> > >          at
> > > org.apache.catalina.core.StandardService.stop(StandardService.
> > > java:554)
> > >          at
> > > 
> org.apache.catalina.core.StandardServer.stop(StandardServer.java:2224)
> > >          at
> > > org.apache.catalina.startup.Catalina.start(Catalina.java:543)
> > >          at
> > > org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> > >          at
> > > org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> > >          at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >          at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> > > orImpl.java:39)
> > >          at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> > > odAccessorImpl.java:25)
> > >          at java.lang.reflect.Method.invoke(Method.java:324)
> > >          at
> > > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> > >
> > >
> > > Many thanks in advance for your help.
> > >
> > > Helene
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >--
> >To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> <mailto:[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