开发者

How do I reach my local development server (127.0.0.1) with a domain name (e.g. www.mydomain.example)

开发者 https://www.devze.com 2023-01-07 05:29 出处:网络
web newbie here, I need to do some testing so I need to reach my development server (127.0.0.1 on Mac OS X) with 开发者_开发百科a \'real\' domian name (e.g. www.mydomain.example). any ideas?If it\'s f

web newbie here, I need to do some testing so I need to reach my development server (127.0.0.1 on Mac OS X) with 开发者_开发百科a 'real' domian name (e.g. www.mydomain.example). any ideas?


If it's for your machine only, manipulating the hosts file is the best option.

Add the following line to it:

127.0.0.1    www.mydomain.com

where it is located depends on your OS. If on Windows, do a search for hosts in C:\Windows\system32

You may have to restart your browser for it to take effect.

0

精彩评论

暂无评论...
验证码 换一张
取 消