操作系统:ubuntu16.04.1 LTS
装的服务器是apache2。默认路径是/var/www
我又新建了一个路径是/var/newdir
结果访问不了。要在apache2.conf里面加上:
<Directory /var/newdir>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
然后,需要在sites-avalilable/000-default.conf
也要要加上:
<Directory /var/newdir>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
不要少了Require all granted.