We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
box install nginx
box install calibreweb
https://<website>/calibreweb
500 Internal Error
2023/09/08 16:45:16 [crit] 2382422#2382422: *490 bind(<IPv6 IP ADDRESS>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <IPv6 IP ADDRESS>, server: <SERVER HOSTNAME>, request: "GET /calibreweb HTTP/2.0", upstream: "http://127.0.0.1:8083/calibreweb", host: "<SERVER HOSTNAME>", referrer: "https://<SERVER HOSTNAME>/"
Page loads.
CalibreWeb is inaccessible if the client is using IPv6.
I fixed this by modifying the nginx configuration in calibreweb.conf to:
calibreweb.conf
location /calibreweb { proxy_pass http://127.0.0.1:8083; proxy_set_header Host $proxy_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header X-Scheme $scheme; proxy_set_header X-Script-Name /calibreweb; # IMPORTANT: path has NO trailing slash }
9dc0c50
Debian 10 (Buster)
amd64
The text was updated successfully, but these errors were encountered:
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection;
Shouldn't be necessary -- these are for websocket upgrades, which I don't think calibre web makes use of.
It looks like the magic happens in translating
proxy_set_header Host $http_host;
to
proxy_set_header Host $proxy_host;
And potentially adding the X-Forwarded-Host (though that mostly depends on whether calbre web even cares about this header)
Sorry, something went wrong.
proxy_bind
Turns out it's not the Host header - http_host/proxy_host are essentially the same.
Host
http_host
proxy_host
It's the proxy_bind bit:
$server_addr
calibreweb
http://127.0.0.1:8083
bind()
I've sent a PR (#1072) which just removes this setting - and falls back to the default behavior (where it binds with the same protocol as upstream)
No branches or pull requests
What happened?
Steps to reproduce:
box install nginx
box install calibreweb
https://<website>/calibreweb
from an IPv6 Address500 Internal Error
Expected results:
Page loads.
Results occur:
CalibreWeb is inaccessible if the client is using IPv6.
I fixed this by modifying the nginx configuration in
calibreweb.conf
to:Swizzin commit
9dc0c50
What OS are you using?
Debian 10 (Buster)
What architecture is your OS?
amd64
Relevant logs and output
The text was updated successfully, but these errors were encountered: