A simple, lightweight static page that also provides a reverse proxy service.
Find a file
maximlucasdev 9348e3db76
All checks were successful
Build Docker image / push-backend-image (push) Successful in 3m43s
revert index.html checker
2025-08-30 18:00:24 +02:00
.forgejo/workflows First version! (ugly code) 2025-08-29 22:32:26 +02:00
config Update due to issues with the docker image 2025-08-30 15:25:04 +02:00
utils Added reverse proxy, config file & more 2025-08-30 14:52:36 +02:00
.gitignore updated gitignore 2025-08-30 15:04:29 +02:00
docker-compose.yml Update due to issues with the docker image 2025-08-30 15:25:04 +02:00
Dockerfile Update due to issues with the docker image 2025-08-30 15:25:04 +02:00
go.mod Added reverse proxy, config file & more 2025-08-30 14:52:36 +02:00
go.sum Added reverse proxy, config file & more 2025-08-30 14:52:36 +02:00
LICENSE Initial commit 2025-08-29 16:58:26 +00:00
main.go Migrated from os to config 2025-08-30 15:45:44 +02:00
README.md Added create a json file 2025-08-30 15:06:06 +02:00
reverseProxy.go Added reverse proxy, config file & more 2025-08-30 14:52:36 +02:00
staticHandler.go revert index.html checker 2025-08-30 18:00:24 +02:00

kitty-pages

A simple, lightweight static page that also provides a reverse proxy service.

Getting started

  • Use the provided docker-compose.yml: curl https://git.ctrlalt.cat/maxim/kitty-pages/raw/branch/main/docker-compose.yml > docker-compose.yml
  • Create an empty config.json file: touch config.json
  • Run docker compose up
  • Wait for the Config file generated. Please edit the config.json file and restart the server. message.
  • Once the message appears, hit ^C (CTRL + C) to exit and stop the container.
  • Edit the config.json file. The server won't start unless you change your ACME email address to a valid one.
  • Recommended: add a 404.html file in the errors folder. That way, when no static sites nor reverse proxies are registered on the given domain, this file is shown. It's useful if you want to show a better page than just "404: Not found"

Hosting a website

To host your static website, a simple http request is all you need for both publishing and updating your website.

You first have to zip your static files.

Here's an example request made with CURL:

curl "https://<domain_pointing_to_a_kitty_pages_instance>/_/upload" -F "domain=domainwhereyouwanttohostyourstaticsite.com" -F "key=yoursecretkey" -F "file=@file.zip"

Every time you upload a new zip file for a domain, existing files will be completely deleted before your zip file is extracted.

Create a new reverse proxy host

Kitty Pages can also act as a reverse proxy. To do so, edit the config.json file.

You will find the following configuration by default:

{
    "reverse_proxy": {
		"hosts": [
			{
				"host": "example.com",
				"dest": "http://somewhere:port"
			}
		]
	}
}

You can add as much hosts as you want.

Quick Reload

By default, you need to restart the server to apply changes. This can be changed by enabling quick_reload in the configuration file.

When quick reload is enabled, the configuration will be updated every time you make changes to the config.json file.