nginx配置404跳转页面
来源:互联网 发布:美国特效软件 编辑:程序博客网 时间:2024/05/20 09:26
nginx -s reload :修改配置后重新加载生效
nginx -s reopen :重新打开日志文件
/usr/local/nginx/conf/nginx.conf 文件存放位置
/usr/local/nginx/sbin/nginx -t 测试nginx配置程序是否运行成功
/usr/local/nginx/sbin/nginx -s reload 重启 nginx
指定404页面路径
404页面代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gbk" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><title>404</title><style>body{ background-color: #0A7189; color: #fff; font: 100% "Lato" , sans-serif; font-size: 1.8rem; font-weight: 300;}a{ color: #75C6D9; text-decoration: none;}h3{ margin-bottom: 1%;}ul{ list-style: none; margin: 0; padding: 0; line-height: 50px;}li{ display: inline-block;}li a:hover{ color: #fff;}.center{ text-align: center;}/* Search Bar Styling */form > *{ vertical-align: middle;}.srchBtn{ border: 0; border-radius: 7px; padding: 0 17px; background: #e74c3c; width: 99px; border-bottom: 5px solid #c0392b; color: #fff; height: 65px; font-size: 1.5rem; cursor: pointer;}.srchBtn:active{ border-bottom: 0px solid #c0392b;}.srchFld{ border: 0; border-radius: 7px; padding: 0 17px; max-width: 404px; width: 40%; border-bottom: 5px solid #bdc3c7; height: 60px; color: #7f8c8d; font-size: 19px;}.srchFld:focus{ outline-color: rgba(255, 255, 255, 0);}/* 404 Styling */.header{ font-size: 13rem; font-weight: 700; margin: 2% 0 2% 0; text-shadow: 0px 3px 0px #7f8c8d;}/* Error Styling */.error{ margin: -70px 0 2% 0; font-size: 4rem; text-shadow: 0px 3px 0px #7f8c8d; font-weight: 100; color: #fff;}</style><script language="javascript" type="text/javascript"> var i = 5; var intervalid; intervalid = setInterval("fun()", 1000); function fun() { if (i == 0) { window.location.href = "http://www.1188fc.com"; clearInterval(intervalid); } document.getElementById("mes").innerHTML = i; i--; } </script> </head><body><section class="center"> <article> <h1 class="header">404</h1> <p>页面出错,请联系管理员!</p> </article> <article> <ul> <li><a href="http://www.1188fc.com">首页</a></li> <li><a href="http://1188fc.com/newhouse/">新房</a></li> <li><a href="http://1188fc.com/newhouse/">资讯</a></li> <li>将在 <span id="mes">5</span> 秒钟后返回首页!</li> </ul> </article></section></body></html>
页面显示效果
0 0
- nginx配置404跳转页面
- 配置nginx的403错误页面跳转
- nginx 配置404页面
- nginx 404页面配置
- NGINX配置404页面
- nginx 404 跳转到自定义的页面
- nginx 配置 404 错误 页面
- nginx 服务器配置404 页面
- Nginx服务器配置404页面
- nginx 配置 rewrite 跳转
- Nginx 域名跳转配置
- nginx 配置301跳转
- nginx配置自动跳转
- Nginx实现web页面跳转
- 配置错误跳转页面
- nginx 设置错误的自定义404页面跳转到500
- nginx 设置错误的自定义404页面跳转到500
- Nginx 配置域名映射、跳转
- Android ServiceConnection
- 修改默认的undo_retention参数设置
- C/C++编程小练习 大数乘法之浮点大数乘法算法
- javascript中JSON把字符串转化成对象,并对里面的属性增删改查
- 手动制作mac电脑的windows安装盘,不通过系统的bootcamp
- nginx配置404跳转页面
- Hbase中checkAndPut操作
- 提高自己网速的方法
- clone-graph
- 第一次总结
- 总结
- Java调用Python
- 迷宫问题
- javaweb开发中的那些坑