nginx+apache 404错误页面

公司新系统  随风做的  给客户演示出错不想让客户看到   自动返回上一页面。

 

刚开始按照网上说的 在nginx 处理:

# 定义错误提示页面
      error_page   500 502 503 504 /50.html;  
        location = error/50.html {
        root   /var/www/website;
        }

没有效果。后来想 后台apache应用处理错误,nginx只是反向代理。

在apache按照网上说的不行:

httpd.conf配置文件 添加

ErrorDocument 404 /404.php

后来发现  添加空控制类:

EmptyController.class.php  即可。

 

posted @ 2015-11-23 17:06  wuling129  阅读(638)  评论(0编辑  收藏  举报