How to turn off default HTTP status code errors in Zend Server?

谁说我不能喝 提交于 2019-12-06 04:45:00

As you can see on the Apache httpd documentation page, you can't disable it.

If you just want no output you have two choices:

# you *HAVE TO* to put at least one character (here it's a space)
ErrorDocument <errorcode> `' '` 

# if you really want to have 0 character, use a blank file
ErrorDocument <errorcode> /var/www/blank

Though you have to this for each error code you want to "disable".

You can make these changes in the httpd server's conf file or in a .htaccess file or a VHost (though I don't know where are the conf files in Zend Server).

I don't think you'll necessarily want to "disable" that error. What you need to do is find out what error is being reported (go through the log file) and then you'll probably find a permission issue or a PHP script that's actually failing and dumping it's core.

To override a default error page in apache, you can place the following line in an .htaccess file or in you httpd.conf config.

ErrorDocument 401 /path/to/the/new/error/page.html

that applies to all error pages you want to override. So just change the status code to 503 for those errors..etc..

More info in the apache documentation: http://httpd.apache.org/docs/1.3/mod/core.html#errordocument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!