Skip to content
This repository was archived by the owner on Jan 8, 2023. It is now read-only.

Commit e2b965d

Browse files
committed
sv1 => dynamic host, improve regex
1 parent cdc898c commit e2b965d

30 files changed

+34
-38
lines changed

400.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 400 - sv1</title>
5+
<title>Error 400 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

401.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 401 - sv1</title>
5+
<title>Error 401 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

402.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 402 - sv1</title>
5+
<title>Error 402 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

403.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 403 - sv1</title>
5+
<title>Error 403 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

404.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 404 - sv1</title>
5+
<title>Error 404 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

405.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 405 - sv1</title>
5+
<title>Error 405 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

406.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 406 - sv1</title>
5+
<title>Error 406 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

407.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 407 - sv1</title>
5+
<title>Error 407 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

408.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 408 - sv1</title>
5+
<title>Error 408 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

409.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 409 - sv1</title>
5+
<title>Error 409 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

410.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 410 - sv1</title>
5+
<title>Error 410 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

414.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 414 - sv1</title>
5+
<title>Error 414 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

416.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 416 - sv1</title>
5+
<title>Error 416 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

418.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 418 - sv1</title>
5+
<title>Error 418 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-image:url('/_errors/images/teapot.jpg');

426.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 426 - sv1</title>
5+
<title>Error 426 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

451.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 451 - sv1</title>
5+
<title>Error 451 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #e74c3c;

500.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 500 - sv1</title>
5+
<title>Error 500 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

501.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 501 - sv1</title>
5+
<title>Error 501 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

502.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 502 - sv1</title>
5+
<title>Error 502 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

503.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 503 - sv1</title>
5+
<title>Error 503 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

504.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 504 - sv1</title>
5+
<title>Error 504 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

505.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 505 - sv1</title>
5+
<title>Error 505 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

506.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 506 - sv1</title>
5+
<title>Error 506 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

507.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 507 - sv1</title>
5+
<title>Error 507 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

508.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 508 - sv1</title>
5+
<title>Error 508 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

50x.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>sv1</title>
5+
<title>%{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

510.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 510 - sv1</title>
5+
<title>Error 510 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

511.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="/_errors/main.css"/>
5-
<title>Error 511 - sv1</title>
5+
<title>Error 511 - %{HOSTNAME}</title>
66
<style>
77
html{
88
background-color: #f1c40f;

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<html>
33
<head>
44
<link rel="stylesheet" type="text/css" href="main.css"/>
5-
<title>sv1</title>
5+
<title>%{HOSTNAME}</title>
66
</head>
77

88
<body>
9-
<h1>sv1</h1>
9+
<h1>%{HOSTNAME}</h1>
1010
</body>
1111
</html>

snippets/error_pages.conf

+4-8
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,11 @@ location ^~ /_errors/ {
3030
root /srv/http/default;
3131
allow all;
3232
}
33-
34-
location ~ /4[0125][0-9].html {
35-
root /srv/http/default;
36-
allow all;
37-
internal;
38-
}
39-
40-
location ~ /50[0-9].html {
33+
location ~ /(4[0125][0-9]|50[0-9])\.html {
4134
root /srv/http/default;
35+
sub_filter '%{HOSTNAME}' $host;
36+
sub_filter_once off;
37+
sub_filter_types text/html;
4238
allow all;
4339
internal;
4440
}

0 commit comments

Comments
 (0)