All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

brennan / bookwrym-fix.md

0 likes
0 forks
1 files
Last active 1 month ago

BookWyrm + Caddy: Static Files Fix

Caddy is proxying directly to Gunicorn, which doesn't serve static files. It returns HTML for every /static/ request, and the browser blocks it due to MIME type mismatch.

The fix is to add a small nginx container between Caddy and Gunicorn. nginx serves /static/ and /images/ straight from the Docker volumes, and passes everything else to Gunicorn.

1. Add the nginx config

Create nginx-books/nginx.conf next to your docker-compose.yml:

Newer Older

Powered by Opengist ⋅ Load: 20ms⋅

日本語
العربية Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 简体中文 繁體中文