December 17th, 2011, 04:39 PM
Set domain url point to local machine or web server?
Hi. I install apache on my ubuntu. I wonder how do I point any traffic from my machine (brower) going to a domain (example: mydomain.com) and actually point to my localhost?
Assume I did the vhost config on my apache or other config. I know in windows I just set a line like mydomain.com 127.0.0.1 on the hosts file in the window system directory.
But how do u do that in linux? Is there a similar host file in my linux machine?
December 17th, 2011, 07:41 PM
December 18th, 2011, 02:46 PM
Thanks. Do I also need to flush host or something? In window I think I need to do ipconfig flushdns or something.
Originally Posted by E-Oreo
December 21st, 2011, 01:21 AM
No, there is no need to flush anything. Changes to the hosts file on Linux takes effect as soon as the file is saved.
You can also do something like this in the hosts file(also works in Windows):
You can separate multiple domains with a space.
127.0.0.1 mydomain.com example.com helloworld.com
December 21st, 2011, 02:35 PM
Thank you. I didn't know I can do that.
Originally Posted by kveroneau