Comments (12)
Hi @jgillman, i have calibre-web running w/o issues behind Nginx reverse proxy. But you are right in that it doesn't work if you reverse map it to some subfolder path.
I think i will add support for the X-Script-Name
header. Then in Nginx you can pass the path prefix like this:
location /calibre {
proxy_pass http://127.0.0.1:8083;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /calibre;
}
from calibre-web.
@BzowK @jgillman Let me know if this works for you.
Nginx example:
server {
location /calibre {
proxy_pass http://127.0.0.1:8083;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /calibre;
}
}
from calibre-web.
That would work for me!
from calibre-web.
btw, to prevent access to the script on the original port, it would be nice to have a listen option where you specify the interface/IP the daemon is listening to. I see something like this already in cps.py but I think the place to put it is the config.ini
from calibre-web.
I, too, am trying to do this by adding it to my existing Windows-based installation of Apache. My other entries (mostly Python-based) are added to conf in the same format. Based on the port settings I configured for calibre-web, I tried adding the following:
<Location /calbooks>
order allow,deny
allow from all
ProxyPass http://localhost:8000
ProxyPassReverse http://localhost:8000
</Location>
When doing so and visiting https://mydomain/calbooks; only some text appears and links fail due to the fact there is no defined proxy path option. If I could configure the proxy path of "/calbooks" for within Apache or calibre-web and use the below, it should work; but obviously don't have the option or know how to do it.
<Location /calbooks>
order allow,deny
allow from all
ProxyPass http://localhost:8000/calbooks
ProxyPassReverse http://localhost:8000/calbooks
</Location>
Any suggestions for how to resolve this? Thanks!
from calibre-web.
@janeczku Works like a charm! Thanks for the feature.
from calibre-web.
Hi,
I am trying to achieve the same thing in regular Apache (not Nginx).
Any advise please??
<Location /books>
ProxyPass http://192.168.0.201:8032
ProxyPassReverse http://192.168.0.201:8032
ProxyAddHeaders Host $http_host;
ProxyAddHeaders X-Forwarded-For $proxy_add_x_forwarded_for;
ProxyAddHeaders X-Scheme $scheme;
ProxyAddHeaders X-Script-Name /books;
</Location>
Thank you.
H.
from calibre-web.
the example in the readme works for me
from calibre-web.
It did not for met... I will try again. Thank you!
from calibre-web.
no luck....
from calibre-web.
has anyone been able to do this with traefik? --url-prefix
would make it easier but i havnt been able to find a way to mimic the nginx config
from calibre-web.
Hello @bcg62,
I make it work behind Traefik (v1.6.3) by adding the property passHostHeader = true in my frontend configuration.
Ex:
[frontends.calibre]
backend = "calibre"
passHostHeader = true
[frontends.calibre.routes.rule1]
rule = "Host:calibre.mydomain.com"
from calibre-web.
Related Issues (20)
- Incorrect tags on LubimyCzytac
- Kobo Sync token contents do not follow the expected json schema HOT 1
- Calibre web not working anymore (internal server error) HOT 7
- Using "count()" to determine the total number in `Pagination` HOT 1
- Error calibre-web HOT 2
- docker channel spam attack HOT 1
- Error uploading with ASCII metadatas on PDF HOT 1
- Multiple kindle emails per calibre-web account HOT 2
- Clicking "Books" results in different books listed for different users HOT 1
- FEAT: Add upload from url (instead of from disk) option
- calibre-web app on asus nas HOT 1
- CALIBRE does not convert from EBOOK to PDF (ver 7.7, 64, Calibre ebook management, Windows 11, 64) HOT 4
- Issue setting up gmail in Docker HOT 1
- After installing Calibre-Web, why can I access the IP+port and log in, but the domain name of the reverse proxy can be accessed but I can't log in, and the password is fine. HOT 1
- Calibre-web error 500 repeated even After calibre restart HOT 3
- "OSError: [Errno 22] Invalid argument" on Kobo Sync HOT 3
- Calibre-Web v0.6.21 failing to finish authentication with timeout while behind cloudflare HOT 3
- Parsing imported files with structured filenames HOT 1
- Kobo Sync Books Failing To Sync; "No such file or directory:..." | Proxmox, Docker, NAS HOT 4
- Multi volume series hard to distinguish HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calibre-web.