SVN 服务器的自定义 401 错误页面

发布于 2024-08-12 20:24:29 字数 221 浏览 4 评论 0原文

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

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

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

感谢您的任何想法。

I have SVN server running on one of my domains as svn.mydomain.com and would like to setup a 401 error document for when the user authentication fails.

As svn isn't an actual folder or real subdomain, i'm confused as to where I can put the ErrorDocument 401 line.

It doesn't have to be in the .htaccess file, if it will work I could put it in the apache config, but not sure if that will work?

Thanks for any ideas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

于我来说 2024-08-19 20:24:29

我将其放入我的虚拟主机定义文件 /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, arnep

I put it into my virtual host definition file at /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, arnep

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文