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