{"id":17139101,"url":"https://github.com/virb3/serve-zip","last_synced_at":"2025-04-13T10:02:40.202Z","repository":{"id":83273752,"uuid":"570681726","full_name":"ViRb3/serve-zip","owner":"ViRb3","description":"Simple HTTP server that streams directories as a ZIP","archived":false,"fork":false,"pushed_at":"2025-03-25T00:28:51.000Z","size":143,"stargazers_count":6,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:22:46.711Z","etag":null,"topics":["browser","file","http","index","light","modern","nginx","server","simple","stream","zip"],"latest_commit_sha":null,"homepage":"","language":"XSLT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ViRb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-25T20:07:07.000Z","updated_at":"2025-03-16T12:34:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cf69668-6529-41ed-8408-da0724fcc4d5","html_url":"https://github.com/ViRb3/serve-zip","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fserve-zip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fserve-zip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fserve-zip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fserve-zip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViRb3","download_url":"https://codeload.github.com/ViRb3/serve-zip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695336,"owners_count":21146953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","file","http","index","light","modern","nginx","server","simple","stream","zip"],"created_at":"2024-10-14T20:11:24.299Z","updated_at":"2025-04-13T10:02:40.165Z","avatar_url":"https://github.com/ViRb3.png","language":"XSLT","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serve-zip\n\n\u003e Simple HTTP server that streams directories as a ZIP\n\n## Introduction\n\nThis server is a dependency for setting up a dead simple, modern file browser using nginx. There are two parts:\n\n1. [autoindex.xslt](./autoindex.xslt), which renders HTML pages to navigate, preview, and download individual files\n2. This server, which allows you to download entire directories as a ZIP file\n\n![](screenshot.png)\n\n## Usage\n\n\u003e **:warning: There is no form of authentication built into this project. It is left for you to set up!**\n\n1. Run this server using the binary in releases or [Docker image](https://hub.docker.com/r/virb3/serve-zip). Run with `--help` to see all available options:\n\n   ```bash\n   Usage: serve-zip \u003croot\u003e\n   \n   Simple HTTP server that streams directories as a ZIP.\n   \n   Arguments:\n     \u003croot\u003e    Path from which to serve files.\n   \n   Flags:\n     -h, --help          Show context-sensitive help.\n         --symlinks      Follow symlinks. WARNING: Allows escaping the root path!\n         --hidden        Serve files and directories that start with dot.\n         --level=0       ZIP compression level (0/store - 9/highest).\n         --prefix=\"/\"    URL prefix to be removed before serving.\n         --host=\"\"       Host on which to listen, empty for all.\n         --port=8080     Port on which to listen.\n         --json          Log in JSON instead of pretty printing.\n   ```\n\n2. In your `/etc/nginx/nginx.conf`, add the following line at the top:\n\n   ```nginx\n   load_module modules/ngx_http_xslt_filter_module.so;\n   ```\n\n3. Drop [autoindex.xslt](./autoindex.xslt) in a path like: `/etc/nginx/static/autoindex.xslt`\n\n4. Set up your file browser conf file, adjusting the server url, autoindex path, and root directory if necessary:\n\n   ```nginx\n   location @zip {\n     proxy_pass http://serve-zip:8080;\n   }\n   error_page 418 = @zip;\n   \n   location / {\n     if ($arg_zip) {\n       return 418;\n     }\n     autoindex on;\n     autoindex_format xml;\n     autoindex_exact_size off;\n     autoindex_localtime off;\n     xslt_stylesheet /etc/nginx/static/autoindex.xslt;\n     root /my-data/;\n   }\n   ```\n\n## Credits\n\n[autoindex.xslt](./autoindex.xslt) is a modified version of [Nginx-Autoindex](https://github.com/EvilVir/Nginx-Autoindex).\n\nThis server borrows some code from [gosses](https://github.com/ViRb3/gosses).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirb3%2Fserve-zip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirb3%2Fserve-zip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirb3%2Fserve-zip/lists"}