host 파일 수정

PHP 2012. 7. 31. 14:15

1. windows/system32/drivers/etc/hosts

위의 경로의 파일을 수정하면 나가는 url을 원하는 곳으로 지정할 수 있다.

ex)

127.0.0.1                localhost

221.143.151.20       www.thethe.co.kr

 

2. 그리고 연결될 서버의 dns 서버 수정

아파치의 httpd.conf 수정 하면 된다.

ex)

/usr/local/apache-1.3.33/conf/httpd.conf

 

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /home/webdocs/www/thethe/market
    ServerName openmarket.thethe.co.kr
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

 

3. 확인은 prompt>nslookup [url]

ex)

c:\>nslookup www.thethe.co.kr

결과

Server:  kns.kornet.net
Address:  168.126.63.1

Name:    openmarket.thessa.co.kr
Address:  221.143.151.20

'PHP' 카테고리의 다른 글

PHP 정규 표현식 문법  (0) 2012.07.31
PHP 정규표현식  (0) 2012.07.31
PHP 내장 함수  (0) 2012.07.27
이클립스 Remote System 에서 코드 어시스트 받기 !  (0) 2012.07.11
PHP 함수 모음  (0) 2012.05.08
블로그 이미지

스마트전

,