【问题标题】:Custom 401 Error Page for SVN ServerSVN 服务器的自定义 401 错误页面
【发布时间】:2009-11-30 10:11:23
【问题描述】:

我的 SVN 服务器作为 svn.mydomain.com 在我的一个域上运行,并希望在用户身份验证失败时设置 401 错误文档。

由于 svn 不是一个实际的文件夹或真正的子域,我很困惑我可以在哪里放置 ErrorDocument 401 行。

它不必在 .htaccess 文件中,如果它可以工作,我可以将它放在 apache 配置中,但不确定是否可以工作?

感谢您的任何想法。

【问题讨论】:

    标签: svn subdomain http-status-code-401 errordocument


    【解决方案1】:

    我将它放入我的虚拟主机定义文件中,位于 /etc/apache2/sites-available/svn.mydomain.com

    <Location />
        DAV svn
        SVNPath /var/lib/svn
        # other svn-config goes here
    
        ErrorDocument 401 "Incorrect username or password"
    </Location>
    

    CU,阿内普

    【讨论】:

    • 效果很好 :-) 现在我只需要弄清楚我的 401.php 文件的相对路径应该是什么
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-19
    • 1970-01-01
    • 2020-11-27
    • 1970-01-01
    • 1970-01-01
    • 2018-12-20
    • 2021-03-04
    相关资源
    最近更新 更多