Skip to content

Commit

Permalink
add haproxy 403 and 504 error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-jonollil committed Oct 15, 2024
1 parent 6516adb commit 2d7eb5e
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 0 deletions.
95 changes: 95 additions & 0 deletions images/router/haproxy/conf/error-page-403.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
HTTP/1.0 403 Forbidden
Pragma: no-cache
Cache-Control: private, max-age=0, no-cache, no-store
Connection: close
Content-Type: text/html

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 1.66666667;
font-size: 16px;
color: #333;
background-color: #fff;
margin: 2em 1em;
}
h1 {
font-size: 28px;
font-weight: 400;
}
p {
margin: 0 0 10px;
}
.alert.alert-info {
background-color: #F0F0F0;
margin-top: 30px;
padding: 30px;
}
.alert p {
padding-left: 35px;
}
ul {
padding-left: 51px;
position: relative;
}
li {
font-size: 14px;
margin-bottom: 1em;
}
p.info {
position: relative;
font-size: 20px;
}
p.info:before, p.info:after {
content: "";
left: 0;
position: absolute;
top: 0;
}
p.info:before {
background: #0066CC;
border-radius: 16px;
color: #fff;
content: "i";
font: bold 16px/24px serif;
height: 24px;
left: 0px;
text-align: center;
top: 4px;
width: 24px;
}

@media (min-width: 768px) {
body {
margin: 6em;
}
}
</style>
</head>
<body>
<div>
<h1>Forbidden</h1>
<p>Request forbidden by administrative rules. The server can be reached and understood the request, but refuses to take any further action</p>

<div class="alert alert-info">
<p class="info">
Possible reasons you are seeing this page:
</p>
<ul>
<li>
<strong>Authorization parameters are missing or set wrong.</strong>
Check your authorization parameters.
</li>
<li>
<strong>Internet protocol address whitelisting.</strong>
Your internet protocol address is not whitelisted, contact to service host.
</li>
</ul>
</div>
</div>
</body>
</html>
91 changes: 91 additions & 0 deletions images/router/haproxy/conf/error-page-504.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
HTTP/1.0 504 Gateway Timeout
Pragma: no-cache
Cache-Control: private, max-age=0, no-cache, no-store
Connection: close
Content-Type: text/html

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 1.66666667;
font-size: 16px;
color: #333;
background-color: #fff;
margin: 2em 1em;
}
h1 {
font-size: 28px;
font-weight: 400;
}
p {
margin: 0 0 10px;
}
.alert.alert-info {
background-color: #F0F0F0;
margin-top: 30px;
padding: 30px;
}
.alert p {
padding-left: 35px;
}
ul {
padding-left: 51px;
position: relative;
}
li {
font-size: 14px;
margin-bottom: 1em;
}
p.info {
position: relative;
font-size: 20px;
}
p.info:before, p.info:after {
content: "";
left: 0;
position: absolute;
top: 0;
}
p.info:before {
background: #0066CC;
border-radius: 16px;
color: #fff;
content: "i";
font: bold 16px/24px serif;
height: 24px;
left: 0px;
text-align: center;
top: 4px;
width: 24px;
}

@media (min-width: 768px) {
body {
margin: 6em;
}
}
</style>
</head>
<body>
<div>
<h1>Gateway timeout</h1>
<p>The server did not respond in time. Please try again later.</p>

<div class="alert alert-info">
<p class="info">
Possible reasons you are seeing this page:
</p>
<ul>
<li>
<strong>Request processing is taking too long.</strong>
The request could not be completed within the given time.
</li>
</ul>
</div>
</div>
</body>
</html>

0 comments on commit 2d7eb5e

Please sign in to comment.