Nginx配置error_page 404错误页面
几个命令自己看吧,不懂的评论提问
error_page 404 = @homepage;
location @homepage {
rewrite .* / permanent;
}
1.测试nginx.conf正确性: /usr/local/nginx/sbin/nginx -t
2.重新加载nginx生效:/usr/local/nginx/sbin/nginx -s reload
赞 (0)
几个命令自己看吧,不懂的评论提问
error_page 404 = @homepage;
location @homepage {
rewrite .* / permanent;
}
1.测试nginx.conf正确性: /usr/local/nginx/sbin/nginx -t
2.重新加载nginx生效:/usr/local/nginx/sbin/nginx -s reload