묻고답하기

사용환경 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 남기남
Harold 기본페이지 설정관련.. [1] 2016.09.23 by Kin
펭구 게시물 본문 중간 배너 삽입 [1] 2016.09.23 by sejin7940
헬스리아 네이버 신디케이션 설정 [2] 2016.09.22 by SimpleCode
robert 아...이걸 어쩌죠...ㅜㅜ 도움 급 필요합니다.. [1] 2016.09.22 by sejin7940
지엔 게시물 하나당 하나의 박스 위젯  
김정호 인덱스 페이지로 가지 못하고 404에러 발생 [1] 2016.09.22 by Kin
골똘 시간대별로 다른게시판으로 게시글 이동  
카라9151c 회사 XE 설치 가능 여부 [1] 2016.09.22 by sejin7940
BizM 시작페이지를 db나 캐쉬와 상관없이 고정하고 싶습니다. [4] 2016.09.21 by BizM
eheka**** XE를 쓰고 있는데요 익명 게시판 질문 드립니다.  
B.G.M^^ xml 쿼리에서 condition (조건문)의 operation (조건)을 변수로 받고 싶은데 가능한가요? [2] 2016.09.21 by B.G.M^^
killdnism 이게 뭔가요? 없애던지? 바꾸던지 해야 하는데~ [1] file 2018.02.17 by killdnism
young.soo ID/PW 찾기 오류에 대해서 여쭤봅니다.  
young.soo 게시판 자바스크립트 기능 삽입에 대한 초보적인 질문입니다. [2] 2016.09.21 by young.soo
young.soo 고급메일 모듈 사용시 발송 내역 기록 오류 입니다.  
강유나 xe 로 웹페이지를 구현하는 중입니다 한 페이지에 게시판 2개 삽입 [2] 2016.09.21 by Kin
Photo3D 관리자 페이지가 이상하게 나옯니다 ㅠㅠ [1] file 2016.09.21 by Kin
이켄 소시랑 메모스킨에서 수정시 원래내용 사라지는 현상 [1] 2016.09.21 by Kin
moonsoo 특정아이디 캐쉬파일재생성 기능문의 [1] 2016.09.21 by Kin
마르티스 안녕하세요 질문이 있어서용! [2] file 2016.09.21 by Kin
대류 스케치북 게시판 쓰시는 분? [1] 2016.09.21 by Kin
아스마 정녕 해결방법을 아시는 분이 안계시나요? ㅜㅜ [1] 2016.09.21 by 감사하는마음이죠
강유나 iframe을 이용해서 게시판 삽입방법 [2] 2016.09.21 by sejin7940
d@s 초보 ^^ 질문드립니다. [4] file 2016.09.21 by d@s
리턴 xe_documents 테이블 최적화한 이후부터 페이지가 안떠요 [1] 2016.09.21 by sejin7940
리턴 스팸글 삭제후에도 xe_documents 용량이 그대로일때 [2] file 2016.09.20 by 리턴
붕붕붕 썸네일 생성 문제(0kb) [1] 2016.09.20 by 기진곰
엘비스 관리자 페이지만 한국어로 보게 할 수는 없을까요? [2] 2016.09.20 by 엘비스
최지훈dbbfb 확장변수 출력 소스를 위젯에 넣어보았습니다. [2] file 2016.09.20 by 최지훈dbbfb
몽실순심 모듈명에 도대체 왜 하이픈(-) 은 안되고 언더스코어 (_) 만 되는 건가요? [3] 2016.09.20 by 기진곰