{"id":17269496,"url":"https://github.com/systemed/mod_mbtiles","last_synced_at":"2025-09-02T22:32:47.368Z","repository":{"id":145599993,"uuid":"496382422","full_name":"systemed/mod_mbtiles","owner":"systemed","description":"Serve tiles with Apache directly from an .mbtiles file","archived":false,"fork":false,"pushed_at":"2022-09-21T09:38:04.000Z","size":4,"stargazers_count":19,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T21:46:49.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/systemed.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-05-25T20:36:24.000Z","updated_at":"2024-08-05T05:34:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ef427e3-7e84-4c29-bec9-ff96aad04aee","html_url":"https://github.com/systemed/mod_mbtiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemed%2Fmod_mbtiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemed%2Fmod_mbtiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemed%2Fmod_mbtiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemed%2Fmod_mbtiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemed","download_url":"https://codeload.github.com/systemed/mod_mbtiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248843867,"owners_count":21170492,"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":[],"created_at":"2024-10-15T08:16:26.732Z","updated_at":"2025-04-14T08:11:00.076Z","avatar_url":"https://github.com/systemed.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## mod_mbtiles\n\nmod_mbtiles is an Apache module to serve tiles directly from an [.mbtiles](https://github.com/mapbox/mbtiles-spec) file using the familiar /tileset/z/x/y.ext path. Use it to serve your vector tiles made with [tilemaker](https://github.com/systemed/tilemaker).\n\nServing directly from .mbtiles is fast, space-efficient and simple.\n\n### Installation\n\n(Most of the commands below will require `sudo` unless you're root.)\n\nYou'll need Apache's module build tool (apxs) and sqlite3 (because .mbtiles are SQLite databases). Install them on Ubuntu/Debian with:\n\n    apt install apache2-dev libsqlite3-dev\n\nThen to build the module and enable it:\n\n    apxs -lsqlite3 -i -a -c mod_mbtiles.c\n\n### Configuration\n\nIn your Apache config file, use `MbtilesEnabled true` to enable vector tile serving for that virtual host, and use `MbtilesAdd` to add each .mbtiles file. For example:\n\n    MbtilesEnabled true\n    MbtilesAdd vt \"/path/to/my/vector_tiles.mbtiles\"\n    MbtilesAdd dem \"/path/to/my/dem.mbtiles\"\n\nThis tells Apache to serve the first .mbtiles at `/vt/z/x/y.pbf`, and the second at `/dem/z/x/y.png`. Reload Apache (`service apache2 reload`) to pick up the config change and see it working!\n\n### Details\n\nYou can use mod_mbtiles to serve both vector (pbf) and raster (png/jpeg/webp) tiles. You don't need to configure this manually - it's automatically sensed from the metadata in your .mbtiles file.\n\nYour vector tiles should be gzip compressed: mod_mbtiles will serve them with a Content-Encoding header.\n\nNote that `MbtilesEnabled` is a per-directory/host setting, but `MbtilesAdd` is a global setting. So if you want to serve different tilesets from different hosts, make sure you use a different name for each.\n\nThere is a maximum of 20 tilesets. You can edit MAX_TILESETS in the source to change this.\n\n### Copyright\n\nRichard Fairhurst, 2022. You may do what you want with this code and there is no warranty.\n\nBased on and heavily expanded from [mod_osm](https://github.com/apeyroux/mod_osm) by Jean-Alexandre Peyroux.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemed%2Fmod_mbtiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemed%2Fmod_mbtiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemed%2Fmod_mbtiles/lists"}