Kamis, 28 Juli 2011

Akses web server tanpa dns server


Sebenernya bingung mau kasih judul apa (Setiap mau kasih judul banyakan bingungnya). Ceritanya gini, kita sudah punya program yang sudah jalan di web server, trus bingung mau akses dari client itu gimana caranya?? masa harus akses kayak gini :
http://192.168.0.1/webyangmaudiakses ?? kalo gini kan rasanya sedikit aneh. Ada cara yang sulit untuk ngatasi ini, yaitu dengan menyediakan DNS server, biar client ga ngaksesnya melalui nomer itu, soalnya nanti dikirain nomer togel.. pye jal??. Tapi kalo ga mau pusing2 bikin DNS server, mending kasih tau aja komputer client, kalo alamat www.websiteyangmaudiakses.com itu ip 192.168.0.1. Silahkan edit file hosts yang terletak disini :
C:\WINDOWS\system32\drivers\etc
tambahin jadi 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
192.168.0.1 www.emc.com

Populer Post