I have hosted my site on TCP port 91.
Is there a way to bind their SSL certificate on that same port 91?
|
I have hosted my site on TCP port 91. Is there a way to bind their SSL certificate on that same port 91? |
||||
|
I'm interpreting this question as "I'm running my site on This can be done using Port Unification, which is supported by Grizzly for example (a Java web server). (Your question doesn't say which server you want to use.) Port unification can work for any protocol where the client is expected to talk first (for example HTTP, SSL/TLS, but not IMAP, ...). Essentially, the server tries to detect which protocol is used by looking at the beginning of the request before dispatching it. If it receives Support for this feature is quite unusual, but it works. However, you will have to specify the port explicitly in your URL if it's not the default (80 will always be the default for I'm not aware of this feature being implemented in Apache Httpd, but that's not in principle a problem. Other answers mention that two services (or two processes) can't listen on the same port. That's true, but nothing prevents the same server/process to be able to handle multiple sites (Apache Httpd does it very well when the same process listens to multiple ports, e.g. 80 and 443, and does the Coming back to the "possible duplicate question", another solution might have been to use RFC 2817, as mentioned in this answer. Unfortunately, although this answer mentions this RFC, the logs it shows indicate that Supporting RFC 2817 is much more involved than supporting port unification, since it requires support on both the client and server sides, including the ability to upgrade in the middle of the protocol. (It's not the end of the world, SMTP, LDAP and others can do this, but it's already widely supported for these protocols.) In contrast, port unification only requires changing the initial dispatch mechanism on the server side. By just specifying the port explicitly in the URL, any browser will support it on the client side. |
|||
|
|
|
It doesn't work. You can only bind one service per port. |
|||||||
|
|
Two services can't listen on the same port on the same system using TCP. You can use NAT and route traffic from different locations to different internal addresses on the same port, but an external IP couldn't use both services on the same port. |
|||
|
|
|
When a user agent or a client initiates a HTTPS request it uses the default port which is If your server is listening on another port (91), then you need to forward port 443 to this port, so when someone types https://www.example.com/, it will point to the server listening on port 91. You cannot have http://www.example.com/ and https://www.example.com/ running on the same port, since only one process may listen on a port. You can have them listening on the same server, if the server has multiple IP addresses. If your server will only have the https site then forwarding 443 to 91 and switching your server to HTTPS will work. |
|||||||
|