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

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 03:58 PM   #1
dom134
Junior Member
dom134 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2016
Device: none
Calibre-server reverse proxy issues

Hello there

I am running owncloud on my Ubuntu server and I also want to run calibre. I only want to port-forward 443 (https) and so am trying to reverse proxy into calibre through 443. I have calibre-server running as a daemon on systemd. At the moment I can access calibre quite happily within my LAN when I use 192.168.1.37:8080; however when I go externally I can only access the calibre front page (albeit without css) and I get a 404 not found from cherrypi when I navigate around the pages.

My /etc/apache2/sites-available/000-default.conf file is:
Quote:
<VirtualHost *:443>
ServerName www.dom134.com
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
</IfModule>
ServerAdmin webmaster@localhost
ServerAlias dom134.com
DocumentRoot /var/www/html
SSLEngine On
SSLCertificateFile <location>
SSLCertificateKeyFile <location>
SSLCACertificateFile <location>
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
ProxyPass /calibre/ http://192.168.1.37:8080/
ProxyPassReverse /calibre/ http://192.168.1.37:8080/
ProxyPreserveHost On
</VirtualHost>
My /lib/systemd/system/calibre.service is:
Quote:
[Unit]
Description=Calibre Service
After=network.target

[Service]
Type=forking
PIDFile=/var/run/calibre-server.pid
ExecStart=/usr/bin/calibre-server \
--daemonize \
--max-cover=600x800 \
--max-opds-items=30 \
--max-opds-ungrouped-items=100 \
--url-prefix /calibre \
--username=dom134_reading \
--password=Password1 \
--port=8080 \
--pidfile=/var/run/calibre-server.pid \
--with-library=/Calibre/

[Install]
WantedBy=multi-user.target
Any help would be greatly appreciated

Last edited by dom134; Yesterday at 03:59 PM. Reason: redacting
dom134 is online now   Reply With Quote
Old Yesterday, 04:45 PM   #2
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 18,109
Karma: 72218365
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
As per https://manual.calibre-ebook.com/server.html

If you are using ProxyPass, you should set up a dedicated VirtualHost and NOT tell calibre to use an --url-prefix
Or use an --url-prefix and RewriteRule, to serve calibre in a subdirectory of the hosted website.

You seem to be mixing the two together.
eschwartz is offline   Reply With Quote
Old Yesterday, 04:47 PM   #3
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 18,109
Karma: 72218365
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Also, for your systemd unit you can skip --pidfile and --daemonize, and use Type=simple
eschwartz is offline   Reply With Quote
Old Today, 05:58 AM   #4
dom134
Junior Member
dom134 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2016
Device: none
Thank you eschwartz,

I have amended my calibre.service file, but I think I am being an ignoramus when it comes to the virtualhost bit. I have created an additional virtualhost as follows, but still to no avail.
Quote:
<VirtualHost *:443>
ServerName www.dom134.com/calibre
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; $
</IfModule>
ServerAdmin webmaster@localhost
ServerAlias dom134.com/calibre
DocumentRoot /var/www/html
SSLEngine On
SSLCertificateFile /location
SSLCertificateKeyFile /location
SSLCACertificateFile /location
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
ProxyPass / http://192.168.1.37:8080/
ProxyPassReverse / http://192.168.1.37:8080/
ProxyPreserveHost On
</VirtualHost>
Would I be better off loading proxy modules rather than using virtualhosts?
dom134 is online now   Reply With Quote
Reply

Tags
apache, calibre-server, reverse proxy, systemd

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aldiko + Calibre-Server + Reverse Proxy dummkauf Related Tools 4 02-02-2016 02:55 PM
Calibre 2 behind Windows Proxy Server ictstbenedicts Calibre 1 10-10-2012 12:41 PM
need help with reverse proxy server novaris Devices 1 09-10-2012 12:22 PM
Content server apache reverse proxy issue bossanova808 Calibre 13 09-16-2011 09:38 AM
Content Server with Apache Reverse Proxy Caleb666 Calibre 1 08-29-2011 04:20 PM


All times are GMT -4. The time now is 06:16 AM.


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