Apache2 show localhost as mydomainname.com [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
开发者_如何学Python Improve this questionI want to record a screencast of a website but it is not live yet. Is it possible in Apache2 to temporarily change localhost to make it look like its the actual web address?
Add an entry in /etc/hosts that resolves to the localhost
http://en.wikipedia.org/wiki/Hosts_%28file%29
E.g.
127.0.0.1 localhost loopback whateverilike.com
Yep, you can use your hosts file to point the domain name to 127.0.0.1.
精彩评论