Change localhost to Your Own Domain


If you ever thought to change localhost to yourdomain.com, then everything you need is just by following this steps:

  1. Edit C:/WINDOWS/system32/drivers/etc/host
  2. Add your wishes:

    127.0.0.1 localhost
    127.0.0.1 yourdomain.com

  3. Edit C:/Program Files/xampp/apache/conf/extra/httpd-vhosts.conf
  4. Add these to the last lines:

    NameVirtualHost localhost:80
    <VirtualHost localhost:80>
    DocumentRoot e:/xampp/htdocs
    ServerName localhost
    </VirtualHost>

    NameVirtualHost yourdomain.com:80
    <VirtualHost yourdomain.com:80>
    DocumentRoot e:/xampp/htdocs/yourdomain
    ServerName yourdomain.com
    </VirtualHost>

  5. Restart your Apache.
  6. Now try to browse http://yourdomain.com

Good luck😉

3 Responses to Change localhost to Your Own Domain

  1. Ali says:

    Hi,

    Why pay for hosting buddy?!!! Use your own pc as a server or just buy a cheap server system. Have peace of mind…. no tensions…cheers….

  2. […] Sumber Posted in Uncategorized. RSS. Trackback. […]

  3. alief says:

    tanks u very much mr,,,i liki it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: