묻고답하기

사용환경 xampp v3.2.2 , apache, MySQL만 사용중/ win7 64bit

----------------

168.188.118.191 이라는 ip를 갖는 서버를 만들었습니다.  이 주소를 인터넷에 치면 제 컴이든 다른컴이든 홈페이지 잘 나옵니다.

그런데...

 

cjktest.co.kr

cjkisee.co.kr

 

이라는 2개의 도메인을 쓰고 싶은데 각각 다른 홈페이지(html) 을 가집니다.

cjktest.co.kr은 C:\xampp\htdocs 에 있는 html

cjkisee.co.kr은  C:\xampp\htdocs\isee 에 있는 html을 불러옵니다.

 

 

168.188.118.191 이라는 서버를 통해 가상호스트를 사용하기 위해

system32 폴더에 있는 hosts 파일에

 

168.188.118.191   cjktest.co.kr

168.188.118.191   cjkisee.co.kr

 

 이라고  해주고

 

C:\xampp\apache\conf\extra에 있는 httpd-vhosts.conf 파일에  다음과 같이 적어줬습니다.

--------------------------------------------------------------------------

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#


NameVirtualHost 168.188.118.191


<VirtualHost 168.188.118.191>

DocumentRoot C:/xampp/htdocs
ServerName cjktest.co.kr


</VirtualHost>

 

<VirtualHost 168.188.118.191>

DocumentRoot C:/xampp/htdocs/isee/
ServerName cjkisee.co.kr


</VirtualHost>

--------------------------------------------------------------------------------

 

 

 

 

다음으로 C:\xampp\apache\conf 의 httpd.conf 파일 중 접근..관련?으로 다음과같이 해줬습니다.

--------------------------------------------------------------------------------

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride None
   
    Order allow,deny
    Allow from all

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

--------------------------------------------------------------------------------

 

이렇게 하면 제 컴퓨터 ( 제 컴이 서버컴입니다 )에서는 두 도메인 모두 잘열립니다.. 생각한대로..

 

근데 폰이나 다른 컴으로 접근하면 페이지를 표시할 수 없다고 나오는데.. 도저히 이유를 모르겠습니다..

 

접근 권한을 가상호스트에 주지 않아서 인지... 잘모르겠습니다... 도와주세요...

아니면 여기가 학교인터넷 망을 쓰는데 거기 관련 문제인지...

도메인 등록??? 을 해야하는건지..?

( 제컴이 서버컴이긴 한데... 도메인으로 접근시 제가 쓰는 주소가 만약 다른사람이 쓰고있거나 어딘가에 등록되지 않아서 인지,...?)

 

( 전에는 main.test.com 이런식으로 가상호스트 도메인을 설정해줬더니 다른 컴퓨터에서 열으니깐

462 forbidden access인가 .. 무슨 DDos 공격때문에 www.test.com 이라는 host 서버로 못갔다는둥 그러던데 .. 이것도 잘모르겠습니다 도메인을좀 다른거로 바꾸니 저런 창은 안뜨던데.. )

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
thdwjdtjr 네이버 웹마스터도구에서 웹페이지 수집요청 문의 드립니다. [1] file 2016.08.22 by SimpleCode
살소리 분류미선택 글쓰기 가능한방법없나요? [2] 2016.08.21 by 살소리
LANDC 1.8.24 업데이트후 알림센터LITE 에러... 도와주세요 부탁드립니다. [2] 2016.08.21 by LANDC
미미미2 운영자가 회원한테 발송한 쪽지 취소할 수 없을까요? [2] 2016.08.21 by 미미미2
디카 위젯 질문 드립니다~ [2] file 2016.08.21 by 디카
페르미오스 member 관련 php 출력 고수님 좀 봐주세요 [1] 2016.08.21 by sejin7940
페르미오스 member_srls 이건 도대체 머죠? member_srl 은 디비에도 있어서 아는대 [2] 2016.08.21 by 페르미오스
초보자 관리자페이지 순방문자수 통계(그래프) 오류  
댑펑 외부 php 파일에서 logged_info 를 가져오려면 어떻게 해야 하나요..? [2] 2016.08.21 by 댑펑
가르송 사이트 반응형 제거 하는방법은.. [2] 2016.08.21 by 가르송
홍찬 유튜브(youtube) 모듈 모바일 스킨에서 재생이 안됩니다, file  
도토리맘 500 error 미국 1and1 호스팅 [1] 2016.08.20 by NOVCUBE
갤럭시탭 아이템 기능 문의 [1] 2016.08.20 by HowtoXE
야야야료 어떤레이아웃을 사용했는지 아시는분 계신가요? [2] 2016.08.20 by 야야야료
dupont 게시판에 글을 작성할때 db관련 오류 메시지가 뜹니다 [2] 2016.08.20 by 실로암
쭈박이 애드몹 관련 질문 드립니다!!  
kyurae 게시판 글 순서 변경 [3] 2016.08.19 by 쟈마쿤
가카 버추얼 호스트?관련인데 도와주세요... [3] 2016.08.19 by 불금
살소리 (추천>비추천시 이동)추천모듈 소스 수정관련 질문드립니다. file  
제로보드처음써요 xe폴더중에 cache파일을 삭제해도 문제가 없나요? [2] file 2016.08.19 by 기진곰
sd**** 암호화 전송 JS를 어디에 추가 하나요? [1] file 2016.08.19 by 기진곰
사계절 XE설치중 DB에 연결할수 없습니다란 오류가 뜹니다, 도와주세요. [5] file 2016.08.19 by 사계절
정음이 확장변수 합계 및 if 출력관련 질문입니다. [1] 2016.08.19 by 얄리뽀
이문이100 캐쉬충전 모듈 혹시 있을까요? [1] 2016.08.19 by 라자루스
기만1988 oops <- 이거 어디서 수정할 수 있을까요? ㅎㅎ [1] 2016.08.19 by sejin7940
갤럭시탭 분류를 관리자만 선택 가능하도록 못하나요? [1] 2016.08.19 by sejin7940
sd**** 로그인 정보에 이전접속 IP표기는 어떻게? [2] 2016.08.19 by sd****
그대사랑가을사랑 모바일에서 접속이 안돼요.  
verysery 레이아웃 추천부탁드릴께요~!  
핏빛노을 xe\files 폴더 권한이 nobody로 설정되어 삭제가 안됩니다. [3] 2016.08.19 by 그대사랑가을사랑