0
点赞
收藏
分享

微信扫一扫

Nginx基础篇(9)自定义404页面

四月天2021 2022-06-04 阅读 222

修改主配置文件

server {
listen 80;
server_name http.com;
location / {
root /http;
index index.html;
}
error_page 404 /404.html;
location = /404.html {
root /http;
}
}
systemctl restart nginx

创建错误反馈页面

echo "404 not found" > /http/404.html

访问不存在的页面

elinks http.com/1111

Nginx基础篇(9)自定义404页面_linux

举报

相关推荐

0 条评论