Biasanya selesai kita menginstal program web local server seperti Xampp, Appserv, Wampp, maka kita mengakses localhost tersebut adalah dengan mengetikkan kata "localhost" di alamat browser.

Namun. . . bagaimana apabila ada CMS tertentu yang secara default memblokir hostname "localhost", seperti pada CMS ECommerce Magento? maka kita harus mengganti nama "localhost" dengan suatu nama domain terserah kita(fake domain, contohnya: dapur-metadesain.com ) yang kita daftarkan secara sengaja di dalam sistem operasi Windows atau Linux yang kita pakai. Sehingga dengan kata lain, saat kita mengetik alamat "dapur-metadesain.com" di browser, maka secara otomatis, local server akan meredirectnya ke tampilan localhost.

Caranya:

1. Temukan file yang bernama "Hosts" di %SYSTEMROOT%\WINDOWS\system32\drivers\etc ( Untuk OS Windows) atau di /etc/ (Untuk OS Linux)

2. Di dalam file tersebut, anda akan temukan baris-baris seperti berikut:

# 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

3. Di baris paling bawah, anda dapat menambahkan baris kalimat baru :

127.0.0.1    nama-domain-buatan-anda.com

Coba aktifkan kembali program web local server anda dan selamat mencoba !

Related News

Contact YM

CS Jasa pembuatan website : Arief

CS Info Pelatihan dan Kursus : Chris

Menerima pembayaran