由网友(丑是丑但是老子有户口i)分享简介:我试着写在我的本地PC的网站.htaccess文件,我已经意识到我需要设置的无所有的AllowOverride代替搜索,找到该文件/etc/apache2/conf.d/security在文件中,我发现#<目录/>#AllowOverride无#Order拒绝,允许所有#Deny#< /...
我试着写在我的本地PC的网站.htaccess文件, 我已经意识到我需要设置的无所有的AllowOverride代替 搜索,找到该文件/etc/apache2/conf.d/security 在文件中,我发现
#<目录/>
#AllowOverride无
#Order拒绝,允许
所有#Deny
#< /目录>
改成了
<目录/>
设置AllowOverride所有
订单拒绝,允许
所有拒绝
< /目录>
键入
服务的Apache2重启
和...的.htaccess仍然没有奏效:我
顺便把文件保存一行,所有拒绝。
解决方案从原来的海报答:
终于找到了正确的地方:在/ etc / apache2的/站点可用/默认 搜索
<目录/ var / WWW />部分,将其改为:
<目录/ var / WWW />
选择了FollowSymLinks指标多视图
设置AllowOverride所有
订购允许,拒绝
允许所有
< /目录>
I tried to write a .htaccess file on my local pc's website, I've realized I need to set AllowOverride All instead of None searched, found the file /etc/apache2/conf.d/security in the file I found
#<Directory />
#AllowOverride None
#Order Deny,Allow
#Deny from all
#</Directory>
changed it to
<Directory />
AllowOverride All
Order Deny,Allow
Deny from all
</Directory>
typed
service apache2 restart
and... .htaccess still didn't work :I
the file by the way, holds one line, deny from all.
解决方案Answer from original poster:
Finally found the right place: /etc/apache2/sites-available/default search for the
<directory /var/www/> part, and changed it to:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
相关推荐
最新文章