묻고답하기

사용환경 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 남기남
도치아빠 게시물 제목 자동입력 [3] 2016.08.26 by 도치아빠
salsatour xe 회원정보보기 아이콘생성 설정? file  
salsatour XE admin 에 대시보드 모듈업데이트 오류 file  
나나2 트위터 링크 입력하면 자동으로 위젯 생성되는 방법이 궁금합니다  
명정 누리고 상세페이지 질문입니다. [4] file 2016.08.26 by 댑펑
골똘 게시판 이미지마다 자동으로 링크 걸기 [1] 2016.08.26 by creare
최지훈dbbfb 사용자 정의 값 출력 문의드립니다. [1] file 2016.08.26 by 초보해외유저
권정현 [긴급] 게시판 관리자 아이디가 갑자기 사라졌어요!! [1] file 2016.08.26 by 초보해외유저
미미미2 특정 익명게시판에서 닉네임을 랜덤으로 뜨게 설정할 수 있을까요? [2] 2016.08.26 by 미미미2
펭구 [긴급 도움 요청] 레이아웃 하단부에 코드가 뜹니다. [1] 2016.08.26 by 초보해외유저
백씨 홈페이지접속시 오류가 뜹니다 [1] 2016.08.26 by 초보해외유저
살소리 스케치북 게시판 css클래스관련질문 file  
lsh4869 hr 테크 컬러값 어디서 변경 할 수 있나요? file  
T3RR3T XE최신버전 php7오류문의 [2] file 2016.08.25 by T3RR3T
살소리 $output->data->count ???? 세단계 변수????? [2] 2016.08.25 by 살소리
명정 누리고 관심상품 및 상세페이지 질문입니다. file  
김 기 상 전자결재 (서류서명)에 대해 문의합니다. [3] 2016.08.25 by 바위0007
도치아빠 회원가입(그룹별) 문의드립니다. [2] 2016.08.25 by 도치아빠
도치아빠 첨부파일에 대하여 묻고싶습니다. [2] file 2016.08.25 by 도치아빠
살소리 포인트 및 레벨 출력관련 질문 [3] 2016.08.25 by 살소리
펭구 글쓰기 관련 문의드립니다. [2] 2016.08.25 by 펭구
초보자 robots.txt 올바르게 작성 되었는지 확인 부탁드립니다.  
sys****0a42f 기본 쪽지 알림을 알림센터 쪽지알림으로 대체  
우랑탕탕이 그누보드5 데이터 추출 방법 있을까요...? [2] 2016.08.24 by 우랑탕탕이
xe사용자권한 xe 메뉴편집탭이 사라지는경우는 어떤경우인가요 ㅠ [1] 2016.08.24 by SimpleCode
냥이 db.config.php 파일 내용이 없어졌어요. [11] 2016.08.24 by 냥이
살소리 xe 모바일페이지 스킨은 공개되어있나요? [2] 2016.08.24 by 살소리
댑펑 외부 파일에서 그룹부여를 하는 방법 질문 [6] 2016.08.24 by 댑펑
베리굿 글쓰기 오류 문의 [1] file 2016.08.24 by 댑펑
댑펑 캐시 파일도 외부 서버로 참조 가능한가요?