-
Notifications
You must be signed in to change notification settings - Fork 0
License
jleedev/zipfs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Launch me with systemd socket activation for FastCGI, or else set $PORT
for HTTP listener (currently broken).
Write your Caddyfile:
root /whatever
@zip {
path *.zip/*
path *.zip
}
reverse_proxy @zip {
to unix/@zipfs
transport fastcgi {
split .zip
}
}
file_server {
browse
precompressed
}
You might think that the file_server directive is entirely unrelated to this
server, that it just seems like a good idea to configure them with the same
document root, but actually you need it so script_filename is correct.
Some zip files (looking at you, duckdb-docs) include absolute URLs and expect
to be unpacked and then served at a root. In this case you can't rely on
fastcgi to split on .zip. Maybe configure the HTTP listener to add and remove
a custom prefix.
Build and install:
go install
install ~/.asdf/installs/golang/1.24.5/packages/bin/zipfs ~/bin/
Do `systemctl --user edit --full --force zipfs.socket`:
[Socket]
ListenStream=@zipfs
[Install]
WantedBy=sockets.target
Do `systemctl --user edit --full --force zipfs.service`:
[Service]
ExecStart=/home/josh/bin/zipfs --index=index.html
Fire it up:
systemctl --user enable zipfs.socket
systemctl --user start zipfs.socket
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published