묻고답하기

사용환경 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 남기남
김선달 이미지에 링크 걸려지나요?  
groo**** DB접속 관련..문의사항  
thdwjdtjr 웹마스터도구에서 검색이 안되는 이유는 ????? [1] 2016.11.01 by SimpleCode
sunnycom 메뉴삭제가 안되는 이유  
만카 안녕하세요 초보 질문 드려요! [1] 2016.11.01 by 만카
Megg PSD로 디자인한걸 CSS로 바꿀 수 있을 정도로 공부하려면요..? 조언부탁드립니다 [2] 2017.06.25 by Megg
마법사 게시물 이동시키면 문서번호가 갱신되게 하는 팁을 찾고있습니다.  
will 다국어 관련 문제(Xedition by 김타조) [5] 2016.11.01 by ehii
장제스 모바일페이지 관련 질문입니다. [1] 2016.10.31 by DoorWeb
시나브로(시조) kcp결제 설정 방법 순서 문의합니다. [1] 2016.10.31 by sejin7940
우리지훈 아이콘샵 깨짐 현상  
DB.class.php on line 633 에러 file  
아짱 로그인 표시가 나오지 않습니다.  
ldy**** XE 설치 [1] file 2016.10.31 by ldy****
영흥도우럭1 XE사이트에 적용된 소셜로그인은 loginXE인가요? [2] 2016.10.31 by 영흥도우럭1
shyduke 언어별 메뉴 선택여부 [2] 2016.10.31 by shyduke
난다여~ 1.8 이상 게시판에서 제목 제한수 해제 [2] 2016.10.31 by 난다여~
baby9999 setTemplateFile를 이용해 페이지 이동시 에러 file  
녹차닢 도와주세요..  
초보자 robots.txt 에 sitemap 위치를 알려줄려고 합니다. [6] 2016.10.30 by 제로캠프
thdwjdtjr 네이버에서 검색 및 노출이 잘 안되고 있습니다.... [1] file 2016.10.29 by 제로캠프
아깡 스케치북5 게시판 스킨 관련 문의 [1] file 2016.10.29 by HowtoXE
jikime 파일첨부가 안되고 슬라이드 이미지 등록시 upload failed 오류 [1] 2016.10.29 by HowtoXE
mmz 트위터에서 동영상 퍼오기가 안됩니다ㅠㅠ [1] 2016.10.29 by HowtoXE
신성3014 사이트 메뉴 편집에서 새 창으로 열기가 안될때 질문입니다 [1] 2016.10.29 by HowtoXE
thdwjdtjr 키워드 작성에 대하여 [1] 2016.10.29 by HowtoXE
콰지모도4b53c 어드민 페이지 등에서 홈 화면으로 리다이렉트되는 문제 [1] 2016.10.29 by 영흥도우럭1
알콜리즘 리스트 상에 commnet 노출방법이 있을까요? [5] 2016.10.29 by 라자루스
영흥도우럭1 레이아웃 편집으로 만들어진 파일 위치가 어디예요? [1] 2016.10.29 by 영흥도우럭1
Anonymous meta property 내용 안보이게 하는방법 [1] 2016.10.28 by 불금