Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2020, 12:30 AM   #1
vinuabe4
Junior Member
vinuabe4 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2020
Device: none
Calibre http to https nginx reverse proxy issue

I have installed calibre web server on ubuntu server and I used nginx reverse proxy to enable SSL. Please find my below mentioned calibre nginx config.
Code:
server {
listen 80;
server_name ebooks.everly.to;


location / {
               proxy_buffering off;
               proxy_pass http://78.46.187.23:8080$request_uri;
return         301 https://$server_name$request_uri;
        }
}

server {
listen 443;
server_name ebooks.everly.to;
ssl on;
        ssl_certificate /opt/certificate.crt;
        ssl_certificate_key /opt/private.key;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers HIGH:!aNULL:!MD5;
        access_log /var/log/calibre-server-access.log;
        error_log /var/log/calibre-server-error.log info;
        proxy_set_header X-Forwarded-For $remote_addr;


location /calibre/web/ {

proxy_set_header        Host                $http_host;
    # The line below is the key line you need:
    proxy_set_header        X-Scheme            $scheme;
    proxy_set_header        X-Real-IP           $remote_addr;
    proxy_set_header        X-Forwarded-For     $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto   $scheme;
    proxy_intercept_errors  on;
    proxy_http_version      1.1;


    proxy_pass              http://78.46.187.23:8080;
}
}
but when I using "return 301 https://$server_name$request_uri;" to forward http traffic to https I am getting "Failed to communicate with "/interface-data/init?1579406936518", network error. Is the server running and accessible?" error

please help me with this

Last edited by PeterT; 01-19-2020 at 12:42 AM.
vinuabe4 is offline   Reply With Quote
Old 01-20-2020, 03:03 AM   #2
vinuabe4
Junior Member
vinuabe4 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2020
Device: none
bump..
vinuabe4 is offline   Reply With Quote
Old 01-20-2020, 09:01 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 36,074
Karma: 15014853
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
WHy is your proxy section so complex? Just use the basic one described here: https://manual.calibre-ebook.com/server.html

And look at the logs of both nginx and the calibre server to see what the issue might be.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help: Using NGINX as reverse-proxy for Calibre haertig Related Tools 5 11-18-2017 09:54 PM
Calibre-server reverse proxy issues dom134 Related Tools 12 05-30-2016 05:39 PM
Nginx Calibre Proxy Ackis Calibre 2 04-19-2016 02:48 PM
Aldiko + Calibre-Server + Reverse Proxy dummkauf Related Tools 4 02-02-2016 03:55 PM
Content server apache reverse proxy issue bossanova808 Calibre 13 09-16-2011 10:38 AM


All times are GMT -4. The time now is 03:27 PM.


MobileRead.com is a privately owned, operated and funded community.