Mengubah localhost dengan domain semaumu (fake)
Jikalau kita telah menginstall salah satu webserver, seperti Apache, ApacheTriad, Appserv, atau XAMPP, pasti kita tahu apa yang terjadi kalau kita membuka browser dan mengetikkan http://localhost atau http://127.0.0.1 Ya, pasti akan menuju file index pada directori root.
Pertanyaan saya, apakah akan menjadi lebih menarik jikalau kita bisa mengganti http://localhost dan http://127.0.01? dengan suatu domain yang sebetulnya tidak ada, misalnya http://www.nickname-anda.com? Saya yakin pasti jawabannya sama, yaitu IYA.
Sekarang sudah cukup pembukaannya, kalau masih tidak mengerti silahkan mencari pengertiannya sendiri dari Google. Kita lanjut kepada tutorialnya. 🙂
Penulis asumsikan bahwa kalian memakai windows seperti penulis pakai. Silahkan buka Command Prompt masing-masing. Lalu edit file “hosts”.
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\AaEzha>cd\ C:\>cd windows/system32/drivers/etc C:\WINDOWS\system32\drivers\etc>type hosts # 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 C:\WINDOWS\system32\drivers\etc>
Nah, perhatikan pada baris terakhir. Disitu lah inti dari file ini karena selain baris itu hanyalah komentar saja.
Kalau mau mengganti, sebetulnya bukan mengganti tapi menambahkan, localhost menjadi domain yang kita inginkan tinggal tambah saja sehingga menjadi :
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\AaEzha>cd\ C:\>cd windows/system32/drivers/etc C:\WINDOWS\system32\drivers\etc>type hosts # 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 www.nickname-anda.com C:\WINDOWS\system32\drivers\etc>
Masih bertanya bagaimana mengedit filenya? Begini ceritanya.. Masih di C:\WINDOWS\system32\drivers\etc> , tulis saja command edit hosts, edit lalu save deh. 🙂
Nah, itu artinya kalau saya coba mengakses http://www.nickname-anda.com maka akan di-direct ke localhost 😉
Anyway, ini juga bisa digunakan untuk blokir beberapa situs yang tidak ingin anda tampilkan di komputer anda, khusus buat para orang tua neh 😀 Atau juga untuk Desktop Phising (tutorialnya menyusul)
Nah, kalau masih ada pertanyaan silahkan layangkan kemari 🙂
Jangan ubah domain fake dengan domain yang sudah exist. Misalnya : kamu ubah domain localhost menjadi http://facebook.com. Maka apabila kita buka facebook.com, maka yang tampil adalah localhost kita 🙂
. wew mantep banget nih
. thanks aa udah nge share :rate
makasih jga udah mau komen dimari :thanks2
appserv sama xampp bagusan mana a?
xampp deh..
iya sih kayanya tp kayanya appserv lebih ringan 😀
katanya nanya lebih bagus yang mana..
ya XAMPP lebih bagus..
plus open source juga :p
wew, kalo ane pake wampserver
.-= bagus aji santoso´s last blog ..Backing Track The Canon Rock – JerryC =-.
tapi xampp di kompie ane berat :p bikin lemot, makan banyak memori :p
bagus ga?
ringan, file kecil. mudah
.-= bagus aji santoso´s last blog ..Backing Track The Canon Rock – JerryC =-.
ntar ane cobain 😀
download aja kang.
.-= bagus aji santoso´s last blog ..Backing Track The Canon Rock – JerryC =-.
Om..koq di komputer saya tidak ada hosts nya??
coba cek bener2 brader 🙂