军哥404和403可以用html吗,具体应该怎么用
看到很多网站404和403都是html的,这个应该怎么实现啊回复 1# 的帖子
下面的帖子刚问了:L ,搜索一下吧 添加后,重启后不管用啊,我把403.html和404.html放在网站的根目录server
{
listen 80;
server_name alex11.3322.org;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/bbs;
error_page 404 /404.html;
error_page 403 /403.html;
include discuz.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
回复 3# 的帖子
/usr/local/nginx/sbin/nginx -t 检查一下是否有错误。 the configuration file /usr/local/nginx/conf/nginx.conf syntax is okconfiguration file /usr/local/nginx/conf/nginx.conf test is successful
没有错误:(
回复 5# 的帖子
先修改nginx.conf,在http段里面找到fastcgi_temp_file_write_size ,在下面添加一行,fastcgi_intercept_errors on;再重启nginx试试 按照军哥的添加后,显示404是
找不到网页
您要查看的网页可能已被删除、名称已被更改,或者暂时不可用。
403显示是
您无权查看该网页
您可能没有权限用您提供的凭据查看此目录或网页。
403和404现实的都不是我自定义403,404里的内容
回复 7# 的帖子
用的ie吗?自定义的404页面必须大于512字节,否则可能会出现IE默认的404页面
页:
[1]