http-basic-auth 背后的 monit 和 apache 站点

发布于 2024-07-27 14:46:14 字数 233 浏览 3 评论 0原文

我有一个受 http-basic-auth 保护的 Web 服务器。 我已通读 monit 文档,似乎没有明确的方法来传递凭据以测试服务器上的测试页面是否正确返回。

有什么想法吗?

谢谢!

(请不要将此与 monit 自己的用于在网页中显示 monit 状态的 httpd 混淆)

PS 这是 monit 4.8.1 —— Ubuntu Hardy 8.04 附带的版本

I have a web server which is protected behind http-basic-auth. I've read through the monit docs and it doesn't seem like there's a clear way to pass credentials in order to test that the test page on the server is being returned correctly.

Any thoughts?

Thanks!

(Please don't confuse this with monit's own httpd for showing monit status in a web page)

PS this is monit 4.8.1 -- that which comes with Ubuntu Hardy 8.04

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

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

发布评论

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

评论(2

缘字诀 2024-08-03 14:46:14

似乎可以在 URL 中包含凭据,您尝试过吗?:(

来自 http://mmonit.com/monit/documentation/monit.html#connection_testing

[...] 其中 URL-spec 是
RFC 中指定的标准形式
2396:

<协议>://<权限><路径>?<查询>

这是一个 URL 示例,其中所有
使用的组件:

http://user:[电子邮件受保护] :8080/document/?querystring#ref

如果包含用户名和密码
URL 中的 Monit 将尝试登录
在服务器上使用Basic
身份验证。

It seems to be possible to include the credentials in the URL, have you tried this?:

(from http://mmonit.com/monit/documentation/monit.html#connection_testing )

[...] Where URL-spec is an URL on the
standard form as specified in RFC
2396:

<protocol>://<authority><path>?<query>

Here is an example of an URL where all
components are used:

http://user:[email protected]:8080/document/?querystring#ref

If a username and password is included
in the URL Monit will attempt to login
at the server using Basic
Authentication.

不甘平庸 2024-08-03 14:46:14

如果您只想检查您的 Web 服务器是否正在侦听端口 80(并且您不关心它返回什么页面或数据),请尝试此操作:

if failed port 80 type TCP then restart

Try this if you just want to check that your web server is listening on port 80 (and you don't care what page or data it returns):

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