LoginSignup
78
69

More than 5 years have passed since last update.

Ubuntu版Apache2でmod_rewriteを有効にする

Last updated at Posted at 2014-08-04

Ubuntuのリポジトリから取得出来るApache2は
オリジナルのApache2とはディレクトリの構成や設定の方法が違うらしい。

まずはmod_rewriteが利用可能となっているかを確認する。

cat /etc/apache2/mods-available/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

使えることが確認できたらa2enmodというコマンドを実行する。

sudo a2enmod rewrite

a2enmodを実行すると以下の様なメッセージが出てくる。

Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart

忘れずにrestartしよう

sudo service apache2 restart
78
69
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
78
69