gpt4 book ai didi

apache - 删除apache认证

转载 作者:行者123 更新时间:2023-12-03 09:26:04 25 4
gpt4 key购买 nike

我需要从我的 Web 服务器中删除 Apache 身份验证。有人把它交给我,而我对 apache 和 PHP 实在是菜鸟。这里是配置文件:

  • /etc/apache2/site-available/testing.local.conf

Blockquote ServerAdmin [email protected]

        ServerName testing.local
DocumentRoot /var/www/testing
ServerAlias www.testing.local
AcceptPathInfo On
AddOutputFilterByType DEFLATE text/html text/plain text/xml
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/www/testing>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/apache2/testing.local_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/testing.local_access.log combined
ServerSignature On

</VirtualHost>
  • .htaccess
RewriteEngine On
RewriteRule ^([^.]+)$ index.php/$1
AuthType Digest
AuthName "ggdev"
AuthDigestDomain /testing
AuthDigestProvider file
AuthUserFile /var/www/env/htpasswd.dav
Require valid-user
php_value short_open_tag off

apache 上启用了 2 个模块:

  • 重写
  • auth_digest

我想让不输入用户名/密码直接进入主页。

最佳答案

改变

Require valid-user

#Require valid-user 

运行

apache2ctl configtest

apachectl configtest

并重新启动网络服务器

apache2ctl restart

apachectl restart

(还有其他方式重启服务器)

如果这还不够,请在以“Require”或“Auth”开头的行前面添加“#”

关于apache - 删除apache认证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21404124/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com