Ini biasanya dibutuhkan para developer web untuk mencoba halaman yang mereka buat supaya lebih nyata sesuai dengan domain yang akan ditempati.
Linux (ubuntu):
- Dari terminal ketik:
$sudo nano /etc/hosts
- Kemudian edit sesukamu dan simpan
127.0.0.1 localhostWindows (xp):
#Tambahkan suka-suka kamu:
127.0.1.1 www.webku.com
127.0.1.2 www.percobaan.edu
127.0.1.3 www.toko.co.id
#selesai
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
- Dari DOS promp masuk ke:
C:\WINDOWS\system32\drivers\etc>
- Ketik:
C:\WINDOWS\system32\drivers\etc> edit hosts
- Kemudian edit sesukamu dan simpan:
# 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
#buat sukasuka kamu
127.0.1.1 komputer.keren.ac.id 127.0.1.2 gogo.com
127.0.1.3 minimal.org
#selesai
Tidak ada komentar:
Posting Komentar