Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache, SSL - multiple sites
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zambizzi
Guru
Guru


Joined: 28 Aug 2004
Posts: 581
Location: Boise Idaho

PostPosted: Wed Nov 24, 2004 8:13 pm    Post subject: apache, SSL - multiple sites Reply with quote

Hi all....

I have a web server running apache 2 on Gentoo and I'm having trouble configuring SSL for multiple sites using one IP address.

I have 3 sites, each w/ their own domain name and each have their own SSL certificate. All 3 use the same IP address in vhosts.conf and all are using port 443 for SSL.

Everything works fine on port 80 but the problem arises with SSL. for "supremegreens.net", everything works and SSL is fine but for the other two sites, I get a warning when switching to https telling me the certificate actually belongs to supremegreens.net and not the current site.

How can I make these warnings go away?

Here is my vhosts.conf

Code:

#supreme-greens.com
NameVirtualHost 204.225.92.137:80
<VirtualHost 204.225.92.137:80>
        DocumentRoot /var/www/localhost/htdocs/supremegreensmsm.com
        ServerName supreme-greens.com
        ServerAlias www.supreme-greens.com
        ErrorLog /var/www/localhost/htdocs/supremegreensmsm.com/logs/supremegreensmsm-error_log
</VirtualHost>

#supremegreens.net
NameVirtualHost 204.225.92.137:80
<VirtualHost 204.225.92.137:80>
        DocumentRoot /var/www/localhost/htdocs/supremegreens.net
        ServerName supremegreens.net
        ServerAlias www.supremegreens.net
        ErrorLog /var/www/localhost/htdocs/supremegreens.net/logs/supremegreens.net-error_log
</VirtualHost>

#supremegreensmsm.com
NameVirtualHost 204.225.92.137:80
<VirtualHost 204.225.92.137:80>
        DocumentRoot /var/www/localhost/htdocs/supremegreensmsm.com_real
        ServerName supremegreensmsm.com
        ServerAlias www.supremegreensmsm.com
        ErrorLog /var/www/localhost/htdocs/supremegreensmsm.com_real/logs/supremegreensmsm_real_log
</VirtualHost>

<IfModule mod_ssl.c>

#SSL for supremegreens.net store
NameVirtualHost 204.225.92.137:443
<VirtualHost 204.225.92.137:443>
    DocumentRoot /var/www/localhost/htdocs/supremegreens.net
    ServerName www.supremegreens.net:443   
    ErrorLog /var/www/localhost/htdocs/supremegreens.net/logs/ssl_error_log

    <IfModule mod_log_config.c>
      TransferLog logs/ssl_access_log
    </IfModule>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/supremegreens.net.crt
    SSLCertificateKeyFile conf/ssl/supremegreens.net.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
      SSLOptions +StdEnvVars
    </Files>

    <Directory "/home/httpd/cgi-bin">
      SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
      CustomLog /var/www/localhost/htdocs/supremegreens.net/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteOptions inherit
    </IfModule>
</VirtualHost>

</IfModule>

<IfModule mod_ssl.c>

#SSL for supreme-greens.com store
NameVirtualHost 204.225.92.137:443
<VirtualHost 204.225.92.137:443>
    DocumentRoot /var/www/localhost/htdocs/supremegreensmsm.com
    ServerName www.supreme-greens.com:443
    ErrorLog /var/www/localhost/htdocs/supremegreensmsm.com/logs/ssl_error_log

    <IfModule mod_log_config.c>
      TransferLog logs/ssl_access_log
    </IfModule>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/supreme-greens.com.crt
    SSLCertificateKeyFile conf/ssl/supreme-greens.com.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
      SSLOptions +StdEnvVars
    </Files>

    <Directory "/home/httpd/cgi-bin">
      SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
      CustomLog /var/www/localhost/htdocs/supremegreensmsm.com/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteOptions inherit
    </IfModule>
</VirtualHost>

</IfModule>

<IfModule mod_ssl.c>

<IfModule mod_ssl.c>

#SSL for supremegreensmsm.com store
NameVirtualHost 204.225.92.137:443
<VirtualHost 204.225.92.137:443>
    DocumentRoot /var/www/localhost/htdocs/supremegreensmsm.com_real
    ServerName www.supremegreensmsm.com:443
    ErrorLog /var/www/localhost/htdocs/supremegreensmsm.com_real/logs/ssl_error_log

    <IfModule mod_log_config.c>
      TransferLog logs/ssl_access_log
    </IfModule>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/supremegreensmsm.com.crt
    SSLCertificateKeyFile conf/ssl/supremegreensmsm.com.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
      SSLOptions +StdEnvVars
    </Files>

    <Directory "/home/httpd/cgi-bin">
      SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
      CustomLog /var/www/localhost/htdocs/supremegreensmsm.com_real/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteOptions inherit
    </IfModule>
</VirtualHost>

</IfModule>


I have verified that all of the ssl certificates are valid and in the correct place. At one point I had these sites pointing from another DNS server to my IP address and the certs worked fine, so I am absolutely sure the issue is NOT with the SSL certs.

Anyone know how I can get rid of the message?

Thanks!
Back to top
View user's profile Send private message
liber!
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2004
Posts: 123
Location: EU, Antwerp

PostPosted: Wed Nov 24, 2004 9:05 pm    Post subject: Reply with quote

This is not a problem, this is a standard...
HTTPS can only be one site per ip per port... sorry :roll:

Maybe you could make something with proxies, but still I advise you to follow the standards and just request extra ip's per https site... (Most European ISP's (in datacenters, not home use) give ip's for free if you say you need them for https...

Greets,
Nathan
Back to top
View user's profile Send private message
liber!
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2004
Posts: 123
Location: EU, Antwerp

PostPosted: Wed Nov 24, 2004 9:06 pm    Post subject: Reply with quote

Oops your from the US, I don't know how it's over there.
Back to top
View user's profile Send private message
unleashedgamers
n00b
n00b


Joined: 22 Nov 2004
Posts: 8
Location: Canada Eh?

PostPosted: Wed Nov 24, 2004 9:50 pm    Post subject: Reply with quote

liber! you are correct, ssl certs require an ip address each per site
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum