Forum Moderators: phranque

Message Too Old, No Replies

Server on 1 static IP with 2 SSL domains?

         

DJMic

12:53 am on Nov 9, 2009 (gmt 0)

10+ Year Member



Can anyone help me out?

Is there anyway to setup a server on 1 static IP and have 2 SSL domains?

I have setup multiple IP addresses in Windows
[windowsreference.com...]

My configuration files are as follows:

Httpd.conf

Listen 192.168.0.108:80
Listen 192.168.0.109:443
Listen 192.168.0.110:443
NameVirtualHost 192.168.0.108:80
NameVirtualHost 192.168.0.109:443
NameVirtualHost 192.168.0.110:443

Httpd-ssl.conf

<VirtualHost 192.168.0.109:443>

# General setup for the virtual host
DocumentRoot "E:/www/www/domains/domain1.com"
ServerName domain1.com:443
ServerAlias www.domain1.com
ServerAdmin webmaster@domain1.com
ErrorLog "E:/www/bin/apache/Apache2.2.11/conf/ssl/logs/ssl_error.log"
TransferLog "E:/www/bin/apache/Apache2.2.11/conf/ssl/logs/ssl_access.log"

<VirtualHost 192.168.0.110:443>

# General setup for the virtual host
DocumentRoot "E:/www/www/domains/domain2.com"
ServerName domain2.com:443
ServerAlias www.domain2.com
ServerAdmin webmaster@domain2.com
ErrorLog "E:/www/bin/apache/Apache2.2.11/conf/ssl/logs/ssl_error.log"
TransferLog "E:/www/bin/apache/Apache2.2.11/conf/ssl/logs/ssl_access.log"

Httpd-vhosts.conf

REDIRECTS:

<VirtualHost 192.168.0.108:80>
DocumentRoot /www/www/domains/domain1.com
RedirectMatch ^/$ [domain1.com...]
ServerName domain1.com
ServerAlias www.domain1.com
ErrorLog /www/www/logs/domain1/error_log
TransferLog /www/www/logs/domain1/access_log
</VirtualHost>

<VirtualHost 192.168.0.110:443>
DocumentRoot /www/www/domains/domain2.com
ServerName domain2.com:443
ServerAlias www.domain2.com
ErrorLog /www/www/logs/domain2/error_log
TransferLog /www/www/logs/domain2/access_log
</VirtualHost>

<VirtualHost 192.168.0.108:80>
DocumentRoot /www/www/domains/domain3.com
ServerName domain3.com
ServerAlias www.domain3.com
ErrorLog /www/www/logs/domain3/error_log
TransferLog /www/www/logs/domain3/access_log
</VirtualHost>

This setup is working but our problem is setting up the 2nd SSL on domain2.com to work because IP 192.168.0.109 in the router forwarded to port 443 works on domain1.com but domain2.com also goes to domain1.com if we change the router to forward IP 192.168.0.110 to port 443 then domain1.com goes to domain2.com and domain2.com works.

Is this because you absolutly can not setup more than 1 domain on an SSL behind a router?

We even tried to use other ports other than 443 and then they didn't even resolve.

Any advise would be appreciated.

jdMorgan

2:29 pm on Nov 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I note that you are redirecting to the domain2 subdirectory as a URL, instead of internally rewriting the domain2 URL requests to the domain2 filespace.

I can't answer your direct question, but externally redirecting instead of internally rewriting will certainly cause problems, not the least of which is 'exposing' the fact that doamin2 is co-hosted as a subdirectory of domain1, and showing that fact in the URL seen in the users' browsers' address bars. There is no reason to do this, and it's a really bad idea SEO-wise.

Jim

DJMic

3:16 pm on Nov 9, 2009 (gmt 0)

10+ Year Member



Just redirecting any http request to https