【发布时间】:2014-05-26 20:30:37
【问题描述】:
我很难在可扩展的 Openshift PHP 应用程序上获得基本的 http 身份验证。在我的 .htaccess 文件中,我有:
AuthUserFile path/to/.htpasswd
AuthType Basic
AuthName "My App"
Require valid-user
这在我的本地测试服务器上效果很好,但是当我尝试在 Openshift 上使用它时,我得到一个 503 Service Unavailable,并且在我的 haproxy.log 中我得到:
[WARNING] 101/113040 (368468) : Server express/local-gear is DOWN, reason: Layer7 wrong status, code: 401, info: "Authorization Required", check duration: 2ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 101/113040 (368468) : proxy 'express' has no server available!
所以我想问题一定出在 HAProxy 服务器上,但我不知道如何解决它。有什么想法吗?
非常感谢!
【问题讨论】:
标签: php apache openshift haproxy