PoiNtEr->: How to change the localhost name in ubuntu (Linux)?

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Sunday, June 19, 2011

How to change the localhost name in ubuntu (Linux)?



Requirements:
apache server should be installed.


    Open the Terminal
    type this command and press enter

    sudo gedit /etc/hosts

hosts will be opened in notepad.
you can find this line :

    127.0.0.1    localhost.localdomain    localhost


Just change the localhost to www.facebook.com
Restart the apache server.
Don't you know how to restart the server. nothing to worry just enter the following command in terminal:

    sudo /etc/init.d/apache2 restart



and thats it!!
Now if you put www.facebook.com in your browser then you will get the default localhost index.html on your browser....

No comments:

Post a Comment