아파치 mod rewrite 활성화

(A2enmod rewrite에서 넘어옴)
아파치 mod_rewrite 활성화
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
a2enmod rewrite

1 문제상황[ | ]

  • .htaccess에 RewriteEngine을 설정했더니 아파치 error 발생
root@zetawiki:~# cat /var/log/apache2/error.log | grep RewriteEngine | tail -1
[Sun Apr 17 21:05:18 2016] [alert] [client 127.0.0.1] /var/www/html/test/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

2 확인[ | ]

root@zetawiki:~# apachectl -D DUMP_MODULES | grep -i rewrite
root@zetawiki:~#
mod_rewrite가 설치되지 않음

3 조치[ | ]

root@zetawiki:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
root@zetawiki:~# service apache2 restart
 * Restarting web server apache2                                                 
 ... waiting                                                             [ OK ]

4 확인 2[ | ]

root@zetawiki:~# apachectl -D DUMP_MODULES | grep -i rewrite
 rewrite_module (shared)

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}