将 AllowOverride 更改为 All 仍然没有

编程入门 行业动态 更新时间:2024-10-26 08:23:34
本文介绍了将 AllowOverride 更改为 All 仍然没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我试图在本地电脑的网站上编写一个 .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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 00:25:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972818.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:AllowOverride

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!