首先打开nginx.conf文件,在fastcgi_temp_file_write_size 128k; 下面添加- fastcgi_intercept_errors on;复制代码注意,包括;号

然后在需要定义的站点的里面添加- error_page 404 = /404.htm; 复制代码例如:
server
{
listen 80;
server_name vps.imcat.in;
index index.html index.htm index.php;
error_page 404 = /404.htm;
include location.conf;
root /home/www/logs;
}

404页面放在站点的跟目录下...

测试配置
/usr/local/nginx/sbin/nginx -t

没错误就重启nginx
/etc/init.d/nginx restart

演示 :http://vps.imcat.in/223424234234242

BTW,其他页面也是这样定义

error_page 502 = /502.htm;

BTW,一键包的卸载功能暂时不出..如果重新配置环境,建议还是重装系统,用干净系统安装.

[ 本帖最后由 shinko 于 2010-5-31 11:06 编辑 ]