Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wish to know how can I host some domain names on my own machine.

I've installed wamp, but I don't wana use localhost/folder_name to access the project's I'm working on. I know that is possible to type www.myproject.com into my browser, but i don't know how or what to search on google. All I've tried didn't give me anything useful

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The hosts file controls access to this. In Windows XP, it's C:\Windows\System32\Drivers\Etc\Hosts with no file extension. You'll need to use notepad to edit the file and add a line reading

127.0.0.1 www.example.com

If there is already a line starting 127.0.0.1 then you should add www.example.com to the end of it

127.0.0.1 localhost www.example.com

Keep in mind that while this line is there you will never be able to access www.example.com on the real server.

share|improve this answer

You can modify your etc/hosts file and add reference to www.myproject.com pointing to 127.0.0.1

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.