Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change localhost with custom port to a fake domain

Tags:

iis

localhost

dns

I have three localhost site with different port..

localhost:80
localhost:81
localhost:82

I want to make fake domains for each site, instead of type localhost:80 on browser, I would like to use a fake domain (such as www.myweb.com)..

I already tried edit the hosts file in C:\windows\system32\drivers\etc..

I add a line 127.0.0.1:81 www.firstfakedomain.com to the hosts file

But it doesn't works!

is it any configuration to be made in this box...

enter image description here

like image 497
Syamsoul Azrien Avatar asked Dec 18 '25 06:12

Syamsoul Azrien


1 Answers

In your host file don;t specify port number. Your host file should have entry like like below

127.0.0.1  test1.com.au
127.0.0.1  test2.com.au

In your IIS application specify host name as test1.com.au and test2.com.au for your applications on port 80.

like image 55
Hakunamatata Avatar answered Dec 21 '25 02:12

Hakunamatata



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!