You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Schmelzer <mi...@gmx.net> on 2007/11/09 10:10:04 UTC

How to configure ssl vhosts in server.xml?

Hi!

I have a Apache Tomcat configuration with vhosts in Tomcats server.xml. Those vhost entries will be generated in the mod_jk.conf during Tomcat start.

So far so good, it works pretty good.

Now I have to configure ssl. At my first try I did that in the ssl_vhost.conf of the Apache:

<VirtualHost devsecure.bla.com:443>
        ServerName devsecure.bla.com
        DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
        ErrorLog /var/log/apache2/error_log
        TransferLog /var/log/apache2/access_log
        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key/devwww.bla.com_server.key
        CustomLog /var/log/apache2/ssl_request_log  ssl_combined
</VirtualHost>

This works too - somehow... However there is a conflict with the vhost definitions in my mod_jk.conf. A warning is displayed when Apache starts:

[warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost directive

I guess it would be helpful to implement the ssl vhosts in my server.xml. This should generate another vhost entry in the mod_jk.conf including the needed ssl properties.

The problem is, I don't know how (parameters, attributes, syntax). Please help! Maybe there is an example or something.

Cheers,
Mike
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Re: RE: How to configure ssl vhosts in server.xml?

Posted by Mike Schmelzer <mi...@gmx.net>.
As I've wrote I already did it like Apache says. It works somehow but it collides with the virtual hosts in the mod_jk.conf.

Mike

-------- Original-Nachricht --------
> Datum: Fri, 9 Nov 2007 09:51:29 +0000
> Von: Nuno Manuel Martins <nu...@sonae.com>
> An: Tomcat Users List <us...@tomcat.apache.org>
> Betreff: RE: How to configure ssl vhosts in server.xml?

> 
> Hi,
> 
> Try to do as Apache says and define it like this:
> 
>         NameVirtualHost *:443
>         <VirtualHost devsecure.bla.com:443>
>           ServerName devsecure.bla.com
>                 [...]
>         </VirtualHost>
> 
>         <VirtualHost devsecure.bla.com:443>
>                 ServerName tstsecure.bla.com
>                 [...]
>         </VirtualHost>
> 
> Hope it helps.
> 
> Regards,
> Nuno
> 
> -----Original Message-----
> From: Mike Schmelzer [mailto:mike_schmelzer@gmx.net]
> Sent: sexta-feira, 9 de Novembro de 2007 9:10
> To: users@tomcat.apache.org
> Subject: How to configure ssl vhosts in server.xml?
> 
> Hi!
> 
> I have a Apache Tomcat configuration with vhosts in Tomcats server.xml.
> Those vhost entries will be generated in the mod_jk.conf during Tomcat start.
> 
> So far so good, it works pretty good.
> 
> Now I have to configure ssl. At my first try I did that in the
> ssl_vhost.conf of the Apache:
> 
> <VirtualHost devsecure.bla.com:443>
>         ServerName devsecure.bla.com
>         DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
>         ErrorLog /var/log/apache2/error_log
>         TransferLog /var/log/apache2/access_log
>         SSLEngine on
>         SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
>         SSLCertificateKeyFile
> /etc/apache2/ssl.key/devwww.bla.com_server.key
>         CustomLog /var/log/apache2/ssl_request_log  ssl_combined
> </VirtualHost>
> 
> This works too - somehow... However there is a conflict with the vhost
> definitions in my mod_jk.conf. A warning is displayed when Apache starts:
> 
> [warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost
> devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost
> directive
> 
> I guess it would be helpful to implement the ssl vhosts in my server.xml.
> This should generate another vhost entry in the mod_jk.conf including the
> needed ssl properties.
> 
> The problem is, I don't know how (parameters, attributes, syntax). Please
> help! Maybe there is an example or something.
> 
> Cheers,
> Mike
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> 
> ---------------------------------------------------------------------
> 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

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

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


RE: How to configure ssl vhosts in server.xml?

Posted by Nuno Manuel Martins <nu...@sonae.com>.
Hi,

Try to do as Apache says and define it like this:

        NameVirtualHost *:443
        <VirtualHost devsecure.bla.com:443>
          ServerName devsecure.bla.com
                [...]
        </VirtualHost>

        <VirtualHost devsecure.bla.com:443>
                ServerName tstsecure.bla.com
                [...]
        </VirtualHost>

Hope it helps.

Regards,
Nuno

-----Original Message-----
From: Mike Schmelzer [mailto:mike_schmelzer@gmx.net]
Sent: sexta-feira, 9 de Novembro de 2007 9:10
To: users@tomcat.apache.org
Subject: How to configure ssl vhosts in server.xml?

Hi!

I have a Apache Tomcat configuration with vhosts in Tomcats server.xml. Those vhost entries will be generated in the mod_jk.conf during Tomcat start.

So far so good, it works pretty good.

Now I have to configure ssl. At my first try I did that in the ssl_vhost.conf of the Apache:

<VirtualHost devsecure.bla.com:443>
        ServerName devsecure.bla.com
        DocumentRoot "/usr/local/vipsysteme/vip8/website/devwww.bla.com"
        ErrorLog /var/log/apache2/error_log
        TransferLog /var/log/apache2/access_log
        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl.crt/devwww.bla.com_server.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key/devwww.bla.com_server.key
        CustomLog /var/log/apache2/ssl_request_log  ssl_combined
</VirtualHost>

This works too - somehow... However there is a conflict with the vhost definitions in my mod_jk.conf. A warning is displayed when Apache starts:

[warn] VirtualHost devsecure.bla.com:443 overlaps with VirtualHost devwww.bla.com:0, the first has precedence, perhaps you need a NameVirtualHost directive

I guess it would be helpful to implement the ssl vhosts in my server.xml. This should generate another vhost entry in the mod_jk.conf including the needed ssl properties.

The problem is, I don't know how (parameters, attributes, syntax). Please help! Maybe there is an example or something.

Cheers,
Mike
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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