Sandy Yung wrote:
>
> Hi,
>
> Thanks. Just want to ask why when i type https://mysite.com/servlet/Hello,
> it will automatically go to 443 not 4444. And that when i type
> https://mysite.com:8080/servlet/Hello, it will not go to 4444.
>
> Sandy
One thing to be clear about is that SSL is not HTTP. It is a different
TCP/IP protocol (like FTP or telnet). Once it has established a
connection it may *use* HTTP but it is not the same thing...
As soon as your browser sees "https" it knows to use SSL so it tries
port 443 as the default and it finds your server on port 443. The reason
this call is going magically to port 443 is because this is the standard
default port for HTTPS - not because of anything clever in your
configuration. If you want it to go directly to port 4444 you have to
specify that in the URL, i.e. https://mysite.com:4444/servlet/Hello.
This is how port-based virtual-hosting works.
When you try https://mysite.com:8080/servlet/Hello, your browser tries
to start an SSL session on port 8080. But that is an HTTP port on your
server so it doesn't work (how is the VH on port 8080 supposed to know
that it is related to the SSL-VH on port 4444?).
I guess you want a set-up where you have two HTTP hosts:
- mysite.com
- mysite.com:8080
then when someone puts https at the front (instead of http), they should
get:
- mysite.com --> mysite.com:443
- mysite.com:8080 --> mysite.com:4444
However, this will only work for the default pair (on 80 and 443). For
the other pair (8080 and 4444) it won't work automatically.
The easiest way is to put the port numbers in the URL. So, on a page
under port 8080 you put the link:
<a href="https://mysite.com:4444"> Go to the SSL site </a>
Best regards,
Owen Boyle
--
SWX Swiss Exchange, 10 Cours de Rive, 1211 Geneve 3
--------------------------+-------------------------
Phone: +41 (0)22 849 5648 | Fax: +41 (0)22 849 5643
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]