当我的 FastCGI 应用程序重新启动时,如何显示维护页面?
我使用独立的 FastCGI 服务器和 FastCgiExternalServer 指令在 Apache2 中为我的 FastCGI 应用程序提供服务。
当我重新启动 FastCGI 应用程序时,我的用户收到 500 错误。我可以做什么来防止这种情况发生?我想向他们展示一个不错的“维护”页面或其他内容。
这是一个用 Perl 编写的 Catalyst 应用程序,我遵循了示例 此处,但我发现提供的是 500,而不是 502 错误网关,因此我无法选择要显示的错误。我不想为合法的内部服务器错误提供维护页面。
I am serving my FastCGI application in Apache2 using the standalone FastCGI server and the FastCgiExternalServer directive.
When I restart my FastCGI app my users get a 500 error. What can I do to prevent this? I want to show them a nice 'maintenance' page or something.
It is a Catalyst application written in perl and I have followed the example here but I have found that a 500 is served and not a 502 bad gateway so I can't select what error to show. I don't want to serve a maintenance page for a legitimate internal server error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您唯一真正的选择是
ErrorDocument 500
并设计一个适合这两种情况的页面,或者mod_fastcgi 开发非常缓慢,但还没有完全消亡,因此您可以随时尝试向上游发送该补丁;如果它被接受,我们将不胜感激。 :)
Your only real choices are
ErrorDocument 500
and design a page that's suitable for either situation, ormod_fastcgi development is very slow, but not completely dead, so you could always try sending that patch upstream; if it was accepted it would be appreciated. :)
谢谢霍布斯,
我采纳了你的建议并创建了一个补丁文件。这对我有用。我知道这是一个老问题,但它对我有帮助,希望这对其他人有帮助。
Thanks Hobbs,
I took your advise and created a patch file. This is working for me. I know this is an old question, but it helped me, hopefully this will help others.