Page 1 of 1
How to change localhost to another name?
Posted: Tue Oct 28, 2008 8:37 am
by azhan
hey guys,
How to change the localhost to another name? like this...
http://virtual/admin.html.....
Im Using Xampp for the database....
I tink there is a folder containing a file like word pad that could add up localhost name....
anybody can help?
Thanks
Azhan
Re: How to change localhost to another name?
Posted: Tue Oct 28, 2008 9:22 am
by onion2k
It's called the host name. If you want to add another then you need to add a new vhost to Apache, and then redirect all calls to it to Apache using your hosts file.
Examples of vhosts:
http://httpd.apache.org/docs/2.0/vhosts/examples.html
Location of your hosts file:
http://en.wikipedia.org/wiki/Hosts_file
This assumes you're using Apache as your local webserver obviously.
EDIT: Actually, thinking about it, you probably only need to add it to the hosts file if all you're doing is copying localhost. If you wanted it to have a different document root or something you'd new a vhost though.
Re: How to change localhost to another name?
Posted: Tue Oct 28, 2008 9:23 am
by VladSun
Edit: As onion2k said, edit your hosts file in \WINDOWS\System32\drivers\etc folder)
Re: How to change localhost to another name?
Posted: Tue Oct 28, 2008 9:56 am
by azhan
okay.....i found it already....thanks u guys!
appreciate it!
