View Single Post
Old 11-18-2017, 04:06 PM   #4
haertig
Wizard
haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.
 
Posts: 1,738
Karma: 26006874
Join Date: Sep 2017
Device: PW3, Fire HD8 Gen7, Moto G7, Sansa Clip v2, Ruizu X26
Why not simply this:

Code:
server {
        listen 80;       
        location /calibre {
                proxy_buffering off;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_pass http://10.192.0.2:8080$request_uri;
        }
}
Rather than what the Calibre documentation recommends:

Code:
server {
        listen 80;
        proxy_set_header X-Forwarded-For $remote_addr;
        location /calibre/ {
                proxy_buffering off;
                proxy_pass http://10.192.0.2:8080$request_uri;
        }
        location /calibre {
                rewrite /calibre /calibre/ permanent;
        }
}
I have tested both configs, and cannot see any difference in how they function from the web browser client end-user viewpoint. Things seem to work just fine either way. Is there some special case that I am not testing that requires the second, longer specification?

I have tested with these URLs:

Code:
http://10.192.0.26/calibre
http://10.192.0.26/calibre/
http://10.192.0.26/calibre/#library_id=Calibre&panel=book_list&sort=author_sort.asc,series.asc&vl=Novels
[ Note: Calibre Content Server started like this: calibre-server --url-prefix /calibre --num-per-page=999 --port 8080 ]

[ Note: 10.192.0.26:80 runs the NGINX reverse proxy (Raspberry Pi3/Raspbian), 10.192.0.2:8080 runs the caliber-server (LinuxMint18 Sarah) ]
haertig is offline   Reply With Quote