将 AllowOverride 更改为 All 仍然没有 [英] Changed the AllowOverride to All and still nothing

查看:25
本文介绍了将 AllowOverride 更改为 All 仍然没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在本地电脑的网站上编写一个 .htaccess 文件,
我意识到我需要设置 AllowOverride All 而不是 None搜索,找到文件/etc/apache2/conf.d/security在我找到的文件中

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>

改成

<Directory />
    AllowOverride All
    Order Deny,Allow
    Deny from all
</Directory>

输入

service apache2 restart

和....htaccess 仍然没有工作:我

and... .htaccess still didn't work :I

顺便说一下,这个文件,只有一行,拒绝所有人.

the file by the way, holds one line, deny from all.

推荐答案

原帖回复:

终于找到合适的地方了:/etc/apache2/sites-available/default搜索

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>

这篇关于将 AllowOverride 更改为 All 仍然没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆