My scenario is I used SWAG as proxy for calibre-web.
my website port is nonstandard, that means I don’t use 80, or 443 as web server site port.
I used subdomain method for the proxy setting. the configuration file in file “calibre-web.subdomain.conf” look like below:
----------------------------------------------calibre-web.subdomain.conf
Version 2020/12/09
make sure that your dns has a cname set for calibre-web
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name calibre-web.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app calibre-web;
set $upstream_port 8083;
set $upstream_proto http;
#proxy_bind $server_addr;
proxy_bind $remote_addr;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header X-Scheme $scheme;
#proxy_redirect http://$host/ https://$host:5000/;
}
}
---------------------------------------------end of the file.
everything is OK, but just when I click login, the content link jumped to calibre-web.xx.duckdns.org, not calibre-web.xx.duckdns.org:5000 again, then the browser report error because it can not access the server from standard port.
so does anybody could help to give me some advise, to make the link jumped but still with initial defined port(like 5000). thanks!