1

I'm running a Springboot application on Windows Server 2012 R2. It seems to demand port 80 when executed from a fat JAR but I don't even want to consider freeing up that port on a Windows server. There seem to be far too many steps involved. In order to bypass this temporarily I was wondering if it was possible to forward anyone that hits my url, i.e. http://webapp to http://ipAddress:8081 and continue to mask the IP/port address with the pretty url. Is this possible and how would I do this?

netsh interface portproxy add v4tov4 listenport=80 listenaddress=10.99.128.6 connectport=8081 connectaddress=10.99.128.6

Apparently this command wasn't enough. When I hit 10.99.128.6:80 it stays at port 80...

Even after examining and confirming the active port mappings:

netsh interface portproxy show v4tov4

Am I missing the point? I'm have no server admin experience. Just need to get this one thing going.

Martin Erlic
  • 119
  • 1
  • 1
  • 7
  • Does this help? http://stackoverflow.com/questions/21083170/spring-boot-how-to-configure-port – Stese Apr 13 '17 at 07:53
  • Unfortunately it doesn't. It's not as simple as changing the application properties to run on port 80. In fact, I don't want to run the app on port 80. I would like to run it on, say, 8081, and anytime a user hits port 80 (default domain port) it would redirect them to 8081. – Martin Erlic Apr 13 '17 at 07:58
  • When you map a port in this way, the port doesn't change, or show that a mapping has taken place, so it's not expected that the browser would show the other port. It happens in the background, so as far as the browser is concerned, it's talking on port 80. If you wanted to show the port change, you'd need to use something like a http redirect rather than a port mapping. – Stese Apr 13 '17 at 08:05

0 Answers0