WHAT'S NEW?
Loading...

Mengganti "Localhost" suka suka :)

Buat yg lagi belajar web server pasti kenal yg namanya LOCALHOST,, yoi ini nama domain webserver bawaan setelah kita instal (misal: xampp, wamp, appserv, easyph) biasanya di browser kita ketik http://localhost// trus masuk ke folder situs kita,, tapi kan lebih keren kalo localhost di addresbar browser kita ganti jadi nama situs!! kayak punya gw nih fachrul.com :P

Caranya:

* Buka direktor C:\Windows\System32\drivers\etc nah disitu ada beberapa file, kita pilih host
* klik kanan –> properties, pilih Tab Security –> pilih button Edit –> di Group or User names: pilih account yang user ente. Kemudian bagian Permission for Users di bagian Full control centang Allow, Kemudian Apply – OK
*Edit file host pakai notepad  atau file editor lain. Setelah dibuka bakal muncul text default kayak gini :



# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost

 Coba peratiin baris di bawah tulisan “127.0.0.1 localhost” itu di nama domain default, kita sekarang tinggal di tambahin / di edit dengan domain sesuai kehendak kita,, kalo gw milih di tambahin,, jadi akses webserver dengan alamat 'localhost' masih tetep bisa,penampakannya  seperti ini :

# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 fachrul.com

Baru di save deh (ctrl+S),, sekarang kita tes di browser fav kite (chrome/ffox) dan ketik 'fachrul.com' pasti sama hasilnya dengan 'localhost'

1 comment: Leave Your Comments

  1. thanks sob infonya,membantu buat pengetahuan dan variasi....

    ReplyDelete