Is it possible to make the localhost to be resolved to another address rather than 127.0.0.1, like for example: www.example.com in XAMPP?
And in which configuration file I can do that if it is possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can.
Edit your hosts file, add a new line for the address like:
127.0.0.1 www.example.comOn linux the file is in
/etcon Windows the file is inC:\windows\system32\drivers\etcIf you want to have different sites for
localhostandwww.example.comyou have to setup your webserver for virtual hosting.