Skip to content

Instantly share code, notes, and snippets.

@G33kDude
Created August 14, 2019 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save G33kDude/5cb9873c0dcf1edc9d44c613d78b50ef to your computer and use it in GitHub Desktop.
Save G33kDude/5cb9873c0dcf1edc9d44c613d78b50ef to your computer and use it in GitHub Desktop.

Reverse Proxy Calibre-Web Container with Different Base URL

When using Calibre-Web from Docker, the most popular container doesn't offer an obvious way to set up a reverse proxy under a different base URL. It's simple to do by writing a request header in your reverse proxy config, as demonstrated below.

Apache

<Location "/calibre/">
	ProxyPass http://127.0.0.1:8083/
	RequestHeader add X-Script-Name "/calibre"
</Location>

Nginx

location /calibre/ {
    proxy_set_header X-Script-Name /calibre/;
    proxy_pass http://127.0.0.1:8083;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment