Sample of multiple ssl sites on 1 IP

Discussion in 'Apache' started by sropensrc, Aug 10, 2010.

  1. #1
    Hi,

    I've been struggling with trying to setup regular site with multiple SSL sites on one apache site config file. We're run Ubuntu 8.0.4, apache 2.2.12(supports SNI) and openssl 0.9.8g. I was wonder if anyone have a working sample that they might share? Below is the current config that I'm trying to use but does not work.
    Thanks

    sropensrc

    NameVirtualHost *:443
    SSLStrictSNIVHostCheck off
    <VirtualHost *:443>
    ServerName sslsite1.domain.com
    ServerAlias sslsite1

    SSLEngine on
    SSLCertificateFile /root/crt/star_domain_com.crt
    SSLCertificateKeyFile /root/ssl/star_domain_com.key
    SSLCertificateChainFile /root/crt/DigiCertCA.crt

    DocumentRoot /home/dir/html/
    <Directory />
    Options None
    AllowOverride None
    </Directory>

    ErrorLog /var/log/apache2/error.log

    More config here
    </VirtualHost>


    ################################# Bride

    <VirtualHost *:443>
    ServerName sslsite2.domain.com
    ServerAlias sslsite2

    SSLEngine on
    SSLCertificateFile /root/crt/star_domain_com.crt
    SSLCertificateKeyFile /root/ssl/star_domain_com.key
    SSLCertificateChainFile /root/crt/DigiCertCA.crt

    DocumentRoot /home/dir/html/
    <Directory />
    Options None
    AllowOverride None
    </Directory>

    ErrorLog /var/log/apache2/error.log

    More config here

    </VirtualHost>
     
    sropensrc, Aug 10, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    You need more than 1 IP, it's 1 IP per SSL certificate/site.
     
    tolra, Aug 11, 2010 IP
  3. sropensrc

    sropensrc Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's what I thought at first, here's a link "http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI". It's probably simpler to setup one IP per ssl site, but we'll be adding more ssl sites in the future, we don't want to add hardware. thanks
     
    sropensrc, Aug 11, 2010 IP
  4. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #4
    Ah, gotcha, I didn't realise that's what you were trying to get working. Personally I've never tried it.
     
    tolra, Aug 11, 2010 IP