묻고답하기

사용환경 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 남기남
경석준 블루호스트에서 최근 xe 설치하신분 있나요?  
마꼬꼬 서브도메인을 네이버에서 검색등록 하신분 계신가요?  
마꼬꼬 화이트 도메인 등록 관련 문의 [4] 2016.09.06 by 마꼬꼬
멈뭄미 외부페이지 문제입니다 너무 답답하네요.  
hellojdy https 도메인과 포트번호 질문입니다! [11] 2016.09.06 by hellojdy
youeun 기존 db에 테이블 xe_mermber  화면탭에 나오는 설정방법  
youeun 회원가입 탭을 생성했습니다 제가 만들 db를 설정하고자 합니다. [2] 2016.09.06 by youeun
TAEYONG2 모바일에서도 pc웹으로 못보나요? [2] file 2016.09.06 by TAEYONG2
Jungyeol apmsetup에서 autoset으로 이동방법?  
webjong 포워딩 연결시 로그인안됩니다..ㅠㅠ [1] 2016.09.06 by webjong
mkp9**** 새로운 게시판이 올라 올 경우 선택적 메일을 보내는 기능 [3] 2016.09.06 by sejin7940
스마일맨 정말 답답합니다. [4] 2016.09.06 by 스마일맨
lifema**** 게시판에서 검색 버튼 활성화 방법 문의드립니다. [4] file 2016.09.05 by lifema****
기서피 누리고 메일인증 가입에서 mypage 그림x나오는 현상입니다.. file  
포천은 문의좀 드립니다. [2] 2016.09.05 by 포천은
너구리리 글 복사시 xe알림센터lite에서 울리는 알림도 복사되는 현상  
nr232**** php.ini를 손 봤음에도 불구하고 input size over than config in php.ini 에러가 뜹니다. file  
아스마 sejin7940 님의 조회수 기능 확장 에드온 에러 해결법 아시는분 계시나요? file  
엔젤킬러 과거 XE core 버전은 어디서 구할수 있을까요? [1] 2016.09.05 by 엔젤킬러
알콜리즘 하나의 게시판 db 로 두개의 리스트 [1] 2016.09.05 by HowtoXE
곰탱이vv 특정 값입력시 반응이 없습니다 [1] 2016.09.05 by HowtoXE
오락실주인 네이버 애널리틱스 스크립트 어디에 넣어요 ? [1] file 2016.09.05 by HowtoXE
승주짱 로그인 문제 도와주세요 [1] 2016.09.05 by HowtoXE
사랑해요비타민C site rss와 site atom이 같이 있어도 되는지 궁금합니다 [2] 2016.09.05 by 사랑해요비타민C
scfree**** 기본 url이 설정이 안되었다고 합니다 [2] 2016.09.05 by scfree****
새양 msg_make_directory_failed 해결법!! [1] 2016.09.05 by J.LAB
토시량 레이아웃이나 기타 위젯,모듈 제작 시 무료배포된것들 기반으로 제작해서 판매해도 되나요? [1] file 2016.09.05 by J.LAB
마꼬꼬 마리아DB (mysql)에서 에러로그 설정 [2] 2016.09.04 by 마꼬꼬
thdwjdtjr FTP 저장시 "553 Could not create file" 오류메세지가 [4] 2016.09.04 by thdwjdtjr
쏭박 로그인을해도 로그인이 안되고 또 어쩔땐 되고 먹통이네요 고수님들 도움부탁드려요 [4] 2016.09.04 by 주니89344