【问题标题】:Disabling servertokens via .htaccess breaks website通过 .htaccess 禁用服务器令牌会破坏网站
【发布时间】:2015-01-28 06:23:33
【问题描述】:

我已将以下代码添加到我网站根文件夹中的 .htaccess 文件中:

# Disable server signature
ServerTokens ProductOnly
ServerSignature Off
# END SCCC    

这会导致我的网站崩溃:

Internal Server Error:
The server encountered an internal error or misconfiguration and was 
unable to complete your request.

删除servertokens 行,它按预期工作并删除签名。

我应该如何禁用服务器令牌?如果我要禁用签名,我什至需要这样做吗?

【问题讨论】:

    标签: apache .htaccess server


    【解决方案1】:

    您只能在服务器配置 (httpd.conf) 中使用ServerTokens
    http://httpd.apache.org/docs/current/en/mod/core.html#servertokens

    .htaccessServerSignature 没问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-11
      • 1970-01-01
      • 2019-12-27
      • 1970-01-01
      • 2018-03-26
      • 2014-01-09
      • 1970-01-01
      相关资源
      最近更新 更多