0

When I register a domain name, I point the A record to my server.

On my server, in IIS, I have bound the domain name to a specific directory path on my server

I wondered if it's possible to achieve the outcome of the above but without domain names, and instead use ports (or something similar)

eg, my server is 1.2.3.4

Is it possible to set IIS up to detect traffic on 1.2.3.4:1 and direct this to directory A (which could be a PHP website)

And if I chose to go to 1.2.3.4:2, it would be bound to a different directory path (such as a .ASP web app)

I have tried doing this by port but always get a 403 and am unsure if what I'm trying is even possible (or not)

  • I hope you navigate sites every day and notice that none of them asks you to specify an extra port number in URL (they all use default port 80 and 443). But if you do want to use various ports, the site bindings do support that https://docs.jexusmanager.com/tutorials/binding-diagnostics.html – Lex Li Jun 25 '22 at 19:35

1 Answers1

0

Yes it's possible to assign ports for each directory just create the website in IIS and in bindings give the port you want to open with it.
have in mind that when you want to access your website you should specify port number

http://1.2.3.4:2

or wtih the domain name

http://test.com:2

the error 403 means that you didn't specify permissions correctly or you don't have specify any file to load by default ...

Salar
  • 142
  • 8