【问题标题】:remove apache authentication删除apache身份验证
【发布时间】:2014-01-30 19:58:19
【问题描述】:

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

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

块引用 ServerAdmin admin@domain.com

        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

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

【问题讨论】:

  • 从 htaccess 中删除所有以 Auth…Require … 开头的行。然后开始阅读 Apache 文档,这样您至少可以大致了解自己在做什么……

标签: apache .htaccess


【解决方案1】:

改变

Require valid-user

#Require valid-user 

运行

apache2ctl configtest

apachectl configtest

然后重启网络服务器

apache2ctl restart

apachectl restart

(还有其他方法可以重启服务器)

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

【讨论】:

    【解决方案2】:

    只需注释掉 Auth(anything) 行,并 Require valid-user 行。然后重新加载 apache。

    顺便说一句。看来您不是配置此服务器的人。

    【讨论】:

      猜你喜欢
      • 2016-05-30
      • 1970-01-01
      • 2015-07-02
      • 2012-02-08
      • 2022-06-23
      • 2011-05-24
      • 2017-06-28
      • 2012-07-27
      • 1970-01-01
      相关资源
      最近更新 更多