具体操作是:
sudo a2enmod
- 1
rewrite
cd /etc/apache2
sudo vim apache2.conf
- 1
- 2
然后将
<Directory /var/www/>
Options Indexes FollowSymlinks
AllowOverride None
Require all granted
</Directory>
- 2
- 3
- 4
- 5
中的AllowOverride None
改为AllowOverride All
然后重启apache即可
sudo /etc/init.d/apache2 restart
转载http://blog.csdn.net/monsterjohn/article/details/47090917