James Jacob wrote:
>   Hi,
>   I'm using Apache HTTP Server (version 2.0.55) for my project. I'm having
> three SSL sites which I run on the same IPaddress, but with different
> port numbers.
>
>   For example say for the ports 443, 444 & 445.
>   The sites I have can be for example,
>   1) one.xyz.com
>   2) two.xyz.com
>   3) three.xyz.com
>
>   I have also set re-direction such that if the user types a  http:// site
> it gets redirected to the corresponding https:// site with the required
> port number. However, the issue comes when the user types https://
> without the required port number, since it goes to the default https://
> site.
>
>   Is there any way to add more SSL virtual server sites with the same IP
> address and Port ?
>   If the user types https://two.xyz.com then it should get re-directed to
> https://two.xyz.com:444 . Rightnow it shows one.xyz.com since that site
> is given with the default port. Any script or something which can do the
> trick could be useful.

The following in your 443 SSL host might work:

RewriteEngine On

RewriteCond %{HTTP_HOST} two\.xyz\.com
RewriteRule /(.*) https://two.xyz.com:444/$1 [R=301]
RewriteCond %{HTTP_HOST} three\.xyz\.com
RewriteRule /(.*) https://three.xyz.com:445/$1 [R=301]

This will, however, not stop the main problem: You'll get the certificate
of one.xyz.com if you go to https://two.xyz.com, which results in a
security message.

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to