Welcome To SMK TI PEMBANGUNAN
Sebelum Masuk Forum , Log in terlebih dahulu

Join the forum, it's quick and easy

Welcome To SMK TI PEMBANGUNAN
Sebelum Masuk Forum , Log in terlebih dahulu
Welcome To SMK TI PEMBANGUNAN
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Pencarian
 
 

Display results as :
 


Rechercher Advanced Search

translator

User Yang Sedang Online
Total 2 uses online :: 0 Terdaftar, 0 Tersembunyi dan 2 Tamu :: 2 Bots

Tidak ada

User online terbanyak adalah 224 pada Sat Aug 21, 2010 12:24 pm

Merubah Nama Domain Localhost

2 posters

Go down

Merubah Nama Domain Localhost Empty Merubah Nama Domain Localhost

Post by SoftMOD|pro*|cuink Tue Apr 13, 2010 10:22 am

Assalamu’alaikum wr. wb.

Bagi temen-temen semua khususnya yang hoby coding dengan php mungkin dah nggak asing lagi dengan kata “localhost”. Yup… localhost merupakan domain default bawaan webserver. Jika teman-teman selesai menginstal webserver (misal: xampp, wamp, appserv, easyphp, dsb ) kemudian ingin mengetahui hasil instalan web server di komputer kita berhasil atau nggak, pasti yang pertama kali yaitu mengisi address bar browser dengan “localhost”. Nah pernahkah anda punya keinginan untuk mengubah dengan nama lain biar seolah-olah kita benar-benar mengakses web dengan domain yang telah kita beli di jasa penyedia hosting?? Mungkin banyak orang sudah mengetahui trik ini, tapi saya rasa banyak juga yang belum tahu.

Trik ini saya dapat dari tempat kerjaku yaitu menambahkan host di local server atau di localhost kita. Jadi misal kita ingin aplikasi web yang telah di buat di localhost ketika mengaksesnya lewat browser bukan lagi http://localhost/ tetapi http://namadomain.com/ maka kita perlu menambahkan host ke server lokal di komputer kita. Dengan kata lain kita ingin membuat nama alias dari localhost.

Oke, kita mulai saja.
Pertama buka Windows Explorer, kemudian akses alamat ini : C:WINDOWSsystem32driversetc. Setelah dibuka maka akan menemukan beberapa file antara lain : host, lmhost, networks, protocol, dan services.

Edit file host pakai notepad++ atau file editor lain. Setelah dibuka akan muncul text default :

# 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

Setelah file tersebut dibuka tambahkan baris di bawah tulisan “127.0.0.1 localhost” sesuai dengan nama domain yang dikehendaki misal domaingue.com. Jadi file tersebut setelah ditambahkan akan menjadi 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 domaingue.com

Setelah itu simpan atau Ctrl+S. Kemudian buka browser dan ketikkan domaingue.com maka akan diarahkan ke localhost kita .

Catatan : Setau saya tips ini berlaku hanya di windows, untuk inux triknya sedikit berbeda, tapi masih bermain table name server, pada file host juga.

Terima Kasih. Semoga bermanfaat.

Wassalamu’alaikum wr wb.http://www.cuinkblog.co.cc/
SoftMOD|pro*|cuink
SoftMOD|pro*|cuink
Software moderator
Software moderator

Zodiac : Gemini Jumlah posting : 115
Join date : 23.09.09
Age : 31
Lokasi : gadobangkong

http://www.tuitme.tk

Kembali Ke Atas Go down

Merubah Nama Domain Localhost Empty Re: Merubah Nama Domain Localhost

Post by kazhekage Sun May 16, 2010 1:58 pm

bisa buat deface gak?
kazhekage
kazhekage
Private
Private

Jumlah posting : 19
Join date : 16.05.10

Kembali Ke Atas Go down

Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik