Setting for avoiding port number in url for custom ports

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting for avoiding port number in url for custom ports

Postby optimisticwalker » 20. September 2018 14:53

What could be the possible server setting for avoiding the port number in url in case of custom non ssl port like 78 and ssl port like 434 instead of standard non ssl port 80 & ssl port 443?

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Setting for avoiding port number in url for custom ports

Postby Nobbie » 20. September 2018 15:06

None.

Port 80 is default for http, Port 443 is default for https. You cannot leave the port numbers, if they have different values than 80/443,
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Setting for avoiding port number in url for custom ports

Postby optimisticwalker » 20. September 2018 15:13

Any redirection rule can do that?

Thanks,
Last edited by optimisticwalker on 20. September 2018 15:17, edited 1 time in total.
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Setting for avoiding port number in url for custom ports

Postby Nobbie » 20. September 2018 15:15

No, nothing. If your server does not listen to port 80, you MUST specify the port in the URL (same for port 443 in case of https).

If you have a router and you have your server running locally, you can apply a portforwarding from port 80 to port 78 (if your router supports that feature). Thats the only option which comes to my mind. The router then is listening to port 80, but redirects certain request to the Xampp server on port 78.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Setting for avoiding port number in url for custom ports

Postby optimisticwalker » 20. September 2018 15:21

Many users may look for the answer of this question in future.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Setting for avoiding port number in url for custom ports

Postby Nobbie » 20. September 2018 15:27

optimisticwalker wrote:Many users may look for the answer of this question in future.


This already has been asked very often, but ususally there is no solution (only that workaround with the router, but this of course only runs locally, not at a webhoster/provider). And it is one (of many) reasons, why we strongly recommend NOT TO CHANGE the default ports for Apache.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Setting for avoiding port number in url for custom ports

Postby optimisticwalker » 20. September 2018 16:00

Another good solution is to use custom non ssl port with default ssl port like 78 & 443 in order to avoid port number in url. the default http// tcp port remains free for other apps then.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Setting for avoiding port number in url for custom ports

Postby Nobbie » 20. September 2018 16:35

optimisticwalker wrote:Another good solution is to use custom non ssl port with default ssl port like 78 & 443 in order to avoid port number in url. the default http// tcp port remains free for other apps then.


Sorry, but this no solution at all, how should a browser know to which port he should send a request, when there is no fixed default port?? Think about twice, before answering. A browser gets an URL and he already must decide, which port to use in order to connect to the remote webserver. How can he know the port, if it is omitted and there is no fixed default port?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 136 guests