Not necessarily. Doors 80 and 443 are the doors pattern for HTTP and HTTPS respectively. However, in many situations, you can use other.
For example, my Tomcat goes up at port 8080. When I put two services on my machine, one goes up at 8080 and the other at 8081.
In practice, you can use http://www.example.com:1234
to denote that you want to access the site www.example.com
via HTTP at port 1234. When using https://www.example.com:1234
, you use HTTPS instead of HTTP. When the port number is omitted/missing, port 80 will be used if it is HTTP or 443 if it is HTTPS.
In theory, nothing would stop you from posting your website at the door you want, and there are some sites that actually do that. However, this doesn’t usually work because there are many firewalls out there that block connections on ports that are not explicitly released, and whereas ports 80 and 443 are the standard HTTP and HTTPS ports used by 99% of websites around the world, they are usually always free, while when using the other ports, you will possibly have problems with users who report not being able to access your site properly.
Another advantage of using standard ports is that you don’t need to put the port number on your Urls, which tends to be something desirable for most sites. Also, when the user is going to type a URL in the browser, he will probably try to type www.example.com
instead of www.example.com:1234
.
On the other hand, by not being required to use the standard port always, it is possible to make more than one HTTP/HTTPS service available on the same machine. Since the doors in use are reserved to the services that listen to them and it is not possible to run two services at the same time on the same machine, on the same IP and on the same door, So if you have a service running on the HTTP protocol at port 80 and you want to provide another service that also runs on the HTTP protocol on the same machine with the same IP, then you have to use a different port. But when using a non-standard port, it will fall into the problems described above. For this reason, some people use proxy/gateway services, where the proxy/gateway is an HTTP/HTTPS service that uses the default ports (80 and 443) and it redirects to the other local services that run on other ports. In this approach, there must be some simple criterion that allows the proxy/gateway to know which service it will redirect to (ex, clientes.example.com
goes to door 1234 and the fornecedores.example.com
goes to 4321). With this, there will be a single service visible externally running on the standard door, while internally there will be several services running on alternative doors.
Default pattern sounded kind of weird.
– user28595
@diegofm was supposed to be parenthetized
– Wallace Maxters