묻고답하기

아파치 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>