diff options
author | hitlerrip <git@hitler.rip> | 2025-08-06 04:32:01 +0000 |
---|---|---|
committer | hitlerrip <git@hitler.rip> | 2025-08-06 04:32:01 +0000 |
commit | f6dddd37f2c17e7f979cc272347dca2909579001 (patch) | |
tree | 3b078819475aa8ae90abbfc55b5cfacd0a6fb319 | |
parent | 0307a1b46354abf919b5cb7017258243e3b8e101 (diff) | |
download | website-f6dddd37f2c17e7f979cc272347dca2909579001.tar.gz website-f6dddd37f2c17e7f979cc272347dca2909579001.tar.bz2 website-f6dddd37f2c17e7f979cc272347dca2909579001.zip |
404 page
- now generates a 404 page on build
- nginx config now points to new 404 page
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | build.sh | 10 | ||||
-rwxr-xr-x | server.sh | 2 |
3 files changed, 12 insertions, 1 deletions
@@ -35,6 +35,5 @@ custom directories are not supported yet. you will have to manually edit the bui - allow user to create directories -- 404 page - cgit: styling - database, php, npm for clicker game @@ -282,6 +282,16 @@ EOF done cd .. +echo "[build] creating 404 page..." +tee ./tmp/temp-404-page.html > /dev/null << EOF + <h1>not found :(</h1> + <span>This page does not exist on this server. <a href="/">Return home</a>.</span> +EOF +cat ./con/header.html \ + ./tmp/temp-404-page.html \ + ./con/footer.html \ + > ./web/404.html + echo "[build] copying static files..." cp ./con/style.css ./web/style.css cp ./con/icon.png ./web/icon.png @@ -156,6 +156,8 @@ server { } root /srv/web; + error_page 404 /404.html + location = /404.html { internal; } index index.html; location / { try_files \$uri \$uri/ =404; |