Questions tagged «errordocument»

1
ProxyPass返回404时的Apache Httpd自定义ErrorDocument 404
我使用Proxy Pass在另一个应用程序服务器的前面有一个Apache Web服务器。当对应用程序的请求返回错误404时,我想显示来自Web服务器的自定义错误页面,而不是来自应用程序服务器的错误页面。我试图在虚拟主机上设置ErrorDocument 404,但是它不起作用。我应该怎么做?还是这不可能? <VirtualHost *:80> ServerName servername DocumentRoot /somepath/ ProxyPass / http://localhost:8080/someapp/ ProxyPassReverse / http://localhost:8080/someapp/ ErrorDocument 404 /error.html </VirtualHost>
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.