Skip to content

Commit 5216448

Browse files
committed
vesta-nginx 404 error handler
1 parent ff325d4 commit 5216448

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

src/rpm/conf/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ http {
8888
ssl_session_cache shared:SSL:10m;
8989
ssl_session_timeout 10m;
9090

91-
error_page 404 /error/index.html;
91+
error_page 404 /error/404/index.html;
9292
error_page 403 /error/index.html;
9393
error_page 500 /error/index.html;
9494

web/error/404/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
3+
<title>404 &mdash; page not found</title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5+
<meta name="description" content="internal error"/>
6+
<style type="text/css">
7+
body {font-size:14px; color:#777777; font-family:arial; text-align:center; background: black;}
8+
h1 {font-size:180px; color:#99A7AF; margin: 70px 0 0 0;}
9+
h2 {color: #DE6C5D; font-family: arial; font-size: 24px; font-weight: bold; letter-spacing: -1px; padding: 40px 0 0 0;}
10+
p {width:320px; text-align:center; margin-left:auto;margin-right:auto; margin-top: 30px }
11+
div {width:320px; text-align:center; margin-left:auto;margin-right:auto;}
12+
a:link {color: #34536A;}
13+
a:visited {color: #34536A;}
14+
a:active {color: #34536A;}
15+
a:hover {color: #34536A;}
16+
</style>
17+
</head>
18+
19+
<body>
20+
<h2>Page Not Found</h2>
21+
<img src="/error/vesta.jpg">
22+
<div>
23+
Try start again from <a href="/">home page</a> or go back to <a href="javascript:%20history.go(-1)">previous page</a>
24+
</div>
25+
</body>
26+
</html>

0 commit comments

Comments
 (0)