Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i map http://localhost:8080 to http://mysites in iis7?

Basically i want to be able to type in http://mysites and it show me my localsite rather than typing in http://localhost:8080/?

I intend to do it a few times like http://localhost:8181 to http://mysites2

I thought you could do it via hosts file?

This is all localy on my machine

like image 833
ivordesign Avatar asked Oct 15 '22 02:10

ivordesign


1 Answers

As stated before, you can edit the hosts file (or update a local DNS server), so that the names point to the desired ip addresses. Some browsers have trouble with cookies when there's no DOT in the name, so you may want to do something like mysites.local or mysites.ivor

If there's something else running on port 80, You have to configure that server to proxy the requests to IIS (on port 80). If you can't run anything on port 80, you can configure the names, but you'll still need the port at the end.

If only IIS is running, you can set this up by using virtual hosts. You add a binding to the IP address, on port 80, to the DNS name you specified. You can run them all on one port as long as they have different host names.

like image 77
Reece45 Avatar answered Jan 04 '23 07:01

Reece45