묻고답하기
아파치 virtualhost 짧은주소(rewrite) 문의
2016.07.26 12:37
아파치 2.4.23, php 5.6.24 환경입니다.
1. rewrite 모듈은 정상적입니다.
[root@test ~]# /usr/local/apache/bin/apachectl -t -D DUMP_MODULES | grep rewrite
rewrite_module (shared)
2. virtualhost설정없이 기본 htdocs에서는 정상적으로 짧은주소(rewrite_mod) 문제없습니다.
3. 문제는 virtualhost 설정을 하면 "짧은 주소를 사용할 수 없습니다. ....rewirte_mod" 문제가 발생합니다.
.htaccess 파일을 수정해야 될 것 같은데, 어떻게 수정해야 할 지 모르겠습니다.
조언 부탁드립니다.
아래는 httpd.conf htdocs 설정입니다.(기본설정에서 AllowOverride All 만 변경했습니다.)
DocumentRoot "/usr/local/apache/htdocs"
<Directory "/usr/local/apache/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 Indexes FollowSymLinks
#
# 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
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
아래는 virtualhost 설정입니다.
<VirtualHost '도메인':80>
DocumentRoot "/home/'홈디렉토리'/public_html"
ServerName '도메인'
ErrorLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/error_log_%Y%m%d 86400"
CustomLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/access_log_%Y%m%d 86400" combined
</VirtualHost>
<Directory "/home/'홈디렉토리'">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
댓글 5
-
SimpleCode
2016.07.26 14:47
-
대보름
2016.07.26 15:34
<Directory> 블럭을 <VirtualHost> 블럭 안에 넣으니까, Forbidden 에러가 발생하네요.
-
SimpleCode
2016.07.26 16:56
Forbidden 에러가 발생하는 경우는 보통 홈 디렉토리 퍼미션 문제입니다. index 파일을 찾지 못해서일 수도 있고요. 정확한 건 아파치 error log를 한 번 보셔야 할 듯 합니다.
-
대보름
2016.07.26 17:04
답변 감사합니다.
Directory 항목을 밖으로 빼면, index.html, phpinfo.php 모두 잘 됩니다. 단지 rewrite_mod만 안되구요.
그냥 짧은주소를 안쓰고 진행하면 xe 설치, 운영하는데는 문제없습니다.
Directory 항목을 안으로 넣으면, Fobidden 퍼미션 오류가 발생하네요.
-
대보름
2016.07.26 15:36
아파치 2.2, PHP 5.3에서는 Virtualhost도 문제없이 잘 되었는데, 아파치 2.4, PHP 5.6에서는 안되네요.
글쓴이 | 제목 | 최종 글 |
---|---|---|
XE | 공지 글 쓰기,삭제 운영방식 변경 공지 [16] | 2019.03.05 by 남기남 |
toshil | 게시판에 새로운 스킨 적용하기.... [4] | 2017.04.06 by toshil |
darios | 가상머신간에 xe옮기는법좀 알려주세요. | |
darios | 가상머신간에 XE 옮길라면 어떻게해야하나요? | |
쪼렙만렙 | Sweet Mobile 레이아웃 저작권 문제 | |
혠 | 스케치북5 게시판 쓰는데 목록에 댓글이 안뜨게 하려면 어떻게 해야하나여 [2] | 2017.04.05 by 혠 |
이온디 | 게시판 태그 페이지에서 카테고리 출력하는 방법 | |
갱느님 | 갤러리 게시판 가로 개수? 조정 어디서 하나요.. 제발 ㅠㅠ [2] | 2017.04.05 by 갱느님 |
심심하루 | 오랜만이라 다 까먹었네요 ㅠㅠㅠ [3] | 2017.04.05 by J__ |
초보의도전 | xedition 서브메뉴에 메뉴 제목 나오는 방법 [2] | 2017.04.05 by 초보의도전 |
도우 | 제로보드 인증메일 재발송 문제 | |
Do_Louie | 디자인설정에서 수정하기 [1] | 2017.04.05 by J__ |
havethe*** | XE 관리자페이지 로그인 정보 [1] | 2017.04.05 by sejin7940 |
kim5**** | 게시판 분류 탭의 "전체" 클릭시 문제점 [3] | 2017.04.05 by kim5**** |
dlalst**** | 게시판 위젯 스킨을 이용중인데요.. 댓글 기능이 없습니다. [4] | 2017.04.05 by dlalst**** |
havethe*** | XE 사용버전 및 설치메뉴얼 [1] | 2017.04.05 by DoorWeb |
보양스토리 | 네이버 연동 오류 | |
최하연 | 게시판 스킨 어떻게 다운로드 하나요? [1] | 2017.04.05 by DoorWeb |
이쩡2 | 안녕하세요 썸네일 관련 질문드려요... [2] | 2017.04.05 by DoorWeb |
모카닷컴 | 멀티도메인에따른 사진경로문제 [1] | 2017.04.05 by eSanSoft |
최선맨 | 도메인 네임서버 |
<Directory> 블럭이 <VirtualHost> 블럭에 안에 들어가야 맞지 않나요?