diff options
author | Chris Xiong <chirs241097@gmail.com> | 2024-06-22 21:45:52 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2024-06-22 21:45:52 -0400 |
commit | e5ec03bbcff7315fae078fec1c8b487642b8010e (patch) | |
tree | 14b9e6022265828bad6050ceced73c1c427069c3 | |
parent | 6fb6c21a14900060e06c994ca0d64ff3936e6675 (diff) | |
download | web-e5ec03bbcff7315fae078fec1c8b487642b8010e.tar.xz |
New error documents.
-rwxr-xr-x | .htaccess | 14 | ||||
-rwxr-xr-x | cgi/e.cgi | 23 | ||||
-rw-r--r-- | err/400.html | 42 | ||||
-rw-r--r-- | err/403.html | 42 | ||||
-rw-r--r-- | err/404.html | 43 | ||||
-rw-r--r-- | err/500.html | 42 | ||||
-rw-r--r-- | err/502.html | 42 | ||||
-rw-r--r-- | err/503.html | 42 | ||||
-rw-r--r-- | err/504.html | 43 |
9 files changed, 30 insertions, 303 deletions
@@ -11,10 +11,10 @@ DirectoryIndex index.shtml index.html Deny from all </Files> RedirectMatch 204 generate_204(.*)$ -ErrorDocument 400 /err/400.html -ErrorDocument 403 /err/403.html -ErrorDocument 404 /err/404.html -ErrorDocument 500 /err/500.html -ErrorDocument 502 /err/502.html -ErrorDocument 503 /err/503.html -ErrorDocument 504 /err/504.html +ErrorDocument 400 /cgi/e.cgi +ErrorDocument 403 /cgi/e.cgi +ErrorDocument 404 /cgi/e.cgi +ErrorDocument 500 /cgi/e.cgi +ErrorDocument 502 /cgi/e.cgi +ErrorDocument 503 /cgi/e.cgi +ErrorDocument 504 /cgi/e.cgi diff --git a/cgi/e.cgi b/cgi/e.cgi new file mode 100755 index 0000000..1384f1e --- /dev/null +++ b/cgi/e.cgi @@ -0,0 +1,23 @@ +#!/bin/bash + +echo -n "Status: ${REDIRECT_STATUS}\r\n" +echo -n "Content-type: text/html; charset=utf-8\r\n\r\n" +cat <<EOF +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width,initial-scale=1"> +<title>This is fine.</title> +<style>@font-face{font-family: 'rocksalt';src: url('https://filestorage.chrisoft.org/rocksalt.woff');}</style> +</head> +<body style="background-color:#000;font-family:rocksalt;"> +<div style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:569px;height:275px;"> +<img src="//filestorage.chrisoft.org/thisisfinext.webp" width="569" alt="THIS IS FINE."> +<div style="position:absolute;left:360px;top:10px;font-size:14pt;font-weight:bold;">${REDIRECT_STATUS}. This is fine.</div> +<div style="font-size:8pt;color:#FFF;">Image by KC Green</div> +</div> +</body> +</html> +EOF + diff --git a/err/400.html b/err/400.html deleted file mode 100644 index 140e592..0000000 --- a/err/400.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>400!!</h1> -<h2>Bad Request</h2> -<p>You've just made a really naughty request. Maybe I'll buy you a toy -instead?</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/403.html b/err/403.html deleted file mode 100644 index dab39bd..0000000 --- a/err/403.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>403!!</h1> -<h2>Forbidden</h2> -<p>You're not allowed to do that.</p> -<p>I'm so sorry.</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/404.html b/err/404.html deleted file mode 100644 index 50b2474..0000000 --- a/err/404.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>404!!</h1> -<h2>Not Found</h2> -<p>You have reached the Void. There's nothing here and your health -just started decreasing.</p> -<p>Run away!</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/500.html b/err/500.html deleted file mode 100644 index a00b0ca..0000000 --- a/err/500.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>500!!</h1> -<h2>Internal Server Error</h2> -<p>Maybe you've just crashed my shitty CGI program. -Either report it, or just start abusing it!</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/502.html b/err/502.html deleted file mode 100644 index 427c96d..0000000 --- a/err/502.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>502!!</h1> -<h2>Bad Gateway</h2> -<p>You've entered the wrong door. Or there's nothing but a wall behind -it.</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/503.html b/err/503.html deleted file mode 100644 index 36db91f..0000000 --- a/err/503.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>503!!</h1> -<h2>Service Unavailable</h2> -<p>Your maid went on a strike together with my server and me. -Fire her!</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> diff --git a/err/504.html b/err/504.html deleted file mode 100644 index 9be7d8d..0000000 --- a/err/504.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="viewport" content="width=device-width"> -<title>Chrisoft::Error!</title> -<link rel="icon" href="/favicon.png"> -<link rel="stylesheet" type="text/css" href="/common.css"> -<script type="text/javascript"> -var link=document.createElement("link"); -var thm=document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)thm\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"); -switch(thm) -{ - case "day": - link.href="/colors-day.css"; - break; - case "night": - link.href="/colors-night.css"; - break; - case "auto": - default: - var c=new Date(); - if(c.getHours()>=6&&c.getHours()<18) - link.href = "/colors-day.css"; - else - link.href = "/colors-night.css"; - break; -} -link.type="text/css"; -link.rel="stylesheet"; -document.getElementsByTagName("head")[0].appendChild(link); -</script> -</head> -<body class="TText"> -<h1>504!!</h1> -<h2>Gateway Timeout</h2> -<p>The door opened, however you saw the whole history of the humankind -through it.</p> -<p>But not the page you are looking for.</p> -<p>--chris</p> -<hr> -<em>Shitty Apache httpd on my shitty sever</em> -</body> |