如何自定义 AWS Load Balancer 服务器错误消息?
How to customise AWS Load Balancer server error message?
我的站点使用 AWS LB 和 Cloudfront。对于不存在的 URL,例如 -
http://mysite-domain/somepath/file-doesnot-exist.jpg
在浏览器屏幕上 returns:
Not Found
The requested URL /somepath/file-doesnot-exist.jpg was not found on this server.
**Apache/2.2.27 (Amazon) Server at my-some-lb-name.eu-west-1.elb.amazonaws.com Port 80**
我不喜欢透露负载平衡服务器名称。如何自定义此 "not found" 屏幕?
至少它没有在最后一行显示服务器名称部分。
我认为您无法在负载平衡器上处理这个问题。听起来您只需要在您的实际 Web 服务器上配置一个 404 页面。
我的站点使用 AWS LB 和 Cloudfront。对于不存在的 URL,例如 - http://mysite-domain/somepath/file-doesnot-exist.jpg
在浏览器屏幕上 returns:
Not Found
The requested URL /somepath/file-doesnot-exist.jpg was not found on this server.
**Apache/2.2.27 (Amazon) Server at my-some-lb-name.eu-west-1.elb.amazonaws.com Port 80**
我不喜欢透露负载平衡服务器名称。如何自定义此 "not found" 屏幕?
至少它没有在最后一行显示服务器名称部分。
我认为您无法在负载平衡器上处理这个问题。听起来您只需要在您的实际 Web 服务器上配置一个 404 页面。