0

I have a virtual machine with a Windows Server 2012 running in a Windows 8 host. The host redirects all http traffic to port 81 to port 80 of the server and there I have an IIS web server. What I'm trying to do is define a private area that use secure connections so users going to example.com/private or example.com/private/anythingelse should be redirected https://example.com/private and https://example.com/private/anythingelse. The thing is that I don'n want to redirect another port in the host (port 444 to port 443 for example). I want the users to keep using urls with the same port (81). Is this possible?

EDIT: To clarify my question. Windows Server (a virtual machine running over VMware) will use standard ports (80 and 443). What I want is access to my host IP to port 81 which is redirected to Windos Server 80 port and force SSL connections to the private area (whitout have to add new redirections on the host).

0

2 Answers 2

1

you can't have http and https on the same port

3
  • Thanks for your answer. Any way to request a secure connection from HTTP? I'm using Windows authentication. Sep 18, 2014 at 11:22
  • 1
    you havent made it clear what you are trying to gain in using non standard ports. Someone requests http (automatically uses port 80), if they are in the private folder you return a redirect, the browser requests the same url using https (automatically on port 443). Using non standard ports you need 2 forwarded ports, one for http and one for https and the redirect has to include the port specifically. It would be more straightforward to give your VM it's own IP.
    – JamesRyan
    Sep 18, 2014 at 11:28
  • I edited the question to clarify. I use standard ports on the server. 81 port is used as a redirection in the host machine. Sep 18, 2014 at 11:33
0

You would have to make it SSL all the time. you cannot have HTTP and HTTPS on 1 port.

Unless... you can do Layer 5 (Session Layer) routing. IF you could do that, you could then differentiate between Normal TCP and TLS. You could then setup a redirect so http://example.com/private to goes https://example.com:80/private. But you would need another VM sitting in the middle of your windows host and ServerVM, doing the routing.

Open the other port. Then in IIS you will need to:

  • Click on the folder you wish to have SSL enabled eg: /private.
  • SSL Settings
  • Require SSL
  • Save

Requirements: You need to have an SSL binding already setup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .