You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Helene Figueiredo <He...@ujf-grenoble.fr> on 2003/01/23 16:36:56 UTC

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.GlobalResourcesLifecycleListener"
             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(ContainerBase.java:1036)
         at 
org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.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(HostConfig.java:370)
         at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.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(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Always with my configuration apache ssl + tomcat on redhat 7.2

Posted by Lajos Moczar <lm...@galatea.com>.
Helene -

One thing you have to remember is that the auto-generated mod_jk.conf 
will not work with Apache virtual hosts. You must put all your JkMount 
commands manually within your 443 virtual host block in httpd.conf. I 
describe how to do it in detail in my http://www.galatea.com/flashguides 
on apache-tomcat integration and virtual hosts in apache-tomcat.

Regards,

Lajos


Helene Figueiredo wrote:
> 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.GlobalResourcesLifecycleListener"
>             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(ContainerBase.java:1036)
>         at 
> org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.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(HostConfig.java:370)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.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(NativeMethodAccessorImpl.java:39) 
> 
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 


-- 



                    Lajos Moczar
       ----------------------------------------
     Open Source Support, Consulting and Training
       ----------------------------------------
             Cocoon Developer's Handbook
  (www.amazon.com/exec/obidos/tg/detail/-/0672322579)

                    _      _____
                   / \         /
                  /___\      /
                 /     \   /____

      http://www.galatea.com -- powered by AzSSL


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>