tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DE VINZELLES, Guillaume \(ext.\)" <Guillaume.DEVINZELLES.prestata...@neufcegetel.fr>
Subject RE: Tomcat, Apache and mod_jk configuration
Date Thu, 19 Oct 2006 12:13:08 GMT
In fact, I've already put the jkMount directive in the VirtualHost conf.
It looks like:

<VirtualHost 88.191.24.6:80>
    DocumentRoot "/var/www/preprod.skyce.net/htdocs"
    <Directory "/var/www/preprod.skyce.net/htdocs">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    ServerName preprod.skyce.net
    ErrorLog /var/www/preprod.skyce.net/log/error_log
    CustomLog /var/www/preprod.skyce.net/log/access_log common
    jkMount /struts-dev-1/*.do ajp13
    jkMount /struts-dev-1/*.jsp ajp13
</VirtualHost>

And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/.

The pertinent fragment of my server.xml is:

<Host name="preprod.skyce.net" appBase="webapps"
	unpackWARs="true" autoDeploy="true"
	xmlValidation="false" xmlNamespaceAware="false">

My webapps are located in /var/tomcat/webapps, and I got:
CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5

Thanks !

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
guillaume.devinzelles@neufcegetel.fr
 
01 70 18 21 64

-----Message d'origine-----
De : Michael Courcy [mailto:michael.courcy@gmail.com] 
Envoyé : jeudi 19 octobre 2006 14:51
À : Tomcat Users List
Objet : Re: Tomcat, Apache and mod_jk configuration

Hello

Here is a fragment of my server.xml

<Host name="www.verlina.com" appBase=""
               unpackWARs="true" autoDeploy="true"
               xmlValidation="false" xmlNamespaceAware="false">

         <Alias>verlina.com</Alias>
         <Alias>tique-et-puce.fr</Alias>
         <Alias>www.tique-et-puce.fr</Alias>
         <Alias>shampooing-chien.fr</Alias>
         <Alias>www.shampooing-chien.fr</Alias>
                

            <Valve className="org.apache.catalina.valves.AccessLogValve"
                     directory="logs"  prefix="verlina.com_access_log." 
suffix=".txt"
                     pattern="common" resolveHosts="false"/>

            <Valve 
className="org.apache.catalina.valves.FastCommonAccessLogValve"
                     directory="logs"  prefix="verlina.com_access_log." 
suffix=".txt"
                     pattern="common" resolveHosts="false"/>

        <Context path="" docBase="/home/verlina/www/" debug="0" >
            <Resource     name="jdbc/verlina" auth="Container" 
type="javax.sql.DataSource"
                 maxActive="100" maxIdle="30" maxWait="10000"
              removeAbandoned="true" removeAbandonedTimeout="60" 
logAbandoned="true"
                 username="***" password="****"
            driverClassName="com.mysql.jdbc.Driver"
                
url="jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true"/>
                 </Context>

 </Host>

And here is a fragment of my httpd.conf

<VirtualHost 87.98.218.193>
ServerName www.verlina.com
ServerAlias verlina.com
ServerAlias tique-et-puce.fr
ServerAlias www.tique-et-puce.fr
ServerAlias shampooing-chien.fr
ServerAlias www.shampooing-chien.fr

JkMount /* ajp13

ServerAdmin webmaster@verlina.com
#DocumentRoot /home/verlina/www
User verlina
Group users

CustomLog logs/verlina-access_log combined
ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/
</VirtualHost>

The idea is to put the JkMount inside the virtualHost of Apache.

But discussing with Mr Caldarale, this layout is weak, even if it works.

Because if you make any change to the context, you're forced to restart 
tomcat instead of just redeploying your context.

There should be a way for your app to programatticly communicate to 
tomcat  the list of domain the app should handle, but I don't know how 
to do that.

Cheers.




DE VINZELLES, Guillaume (ext.) a écrit :
> Hi there,
>
> Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps.
I got a working Apache 2, configured with several virtualhosts.
> I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything
is working fine.
> Now, I'd like to map each one of my webapps to a different virtualhost.
> For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1,
should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already
that working).
> How do you achieve this using the jkMount directives?
> I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1.
>
> Thanks in advance for your answers!
>
> Guillaume de Vinzelles
> DSI/PFS Neuf Cegetel
> Altran Technologies
>  
> guillaume.devinzelles@neufcegetel.fr
>  
> 01 70 18 21 64
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message