-   Linux - Server (
-   -   Apache: Change http://localhost to (

mlandvo 08-12-2010 09:39 AM

Apache: Change http://localhost to
Hi all

Ive used apache as my webserver,and when i insert http://localhost its displays the apache index webpage which i assume its working.

My problem now is how to change the url http://localhost/mysite to

thank you in advance


b0uncer 08-12-2010 09:47 AM

One way is to modify your /etc/hosts file. It has (should have) the line
Code:    localhost
which you can change to
Code:    localhost
After saving, if your server is running, type the address and it should go there (works here).

Just remember that because it's configured locally, your friends won't be able to do that. If you want it to be global, buy a domain name for your server.

Edit: to be clear, after that change ought to point to your www root directory, which is accessed at http://localhost.

All times are GMT -5. The time now is 06:53 PM.