![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2016
Device: nook
|
Binding calibre-server to 127.0.0.1
When running a headless server with calibre-server, how does one specify that the server only run on 127.0.0.1:8080?
I want to secure the server using basic http authentication with SSL and an apache reverse proxy. I have all this setup, however if you browse to myserverip.com:8080, Calibre loads just fine without going through the apache directory I setup on my server(the apache directory also loads and I want that to be the only way to access the library). I need to bind the calibre server to localhose only so that the only way to access it is through the apache reverse proxy. I've seen numerous posts about preferences --> tweaks and setting server_listen_on, however that's only through the gui. How do I do this when running a headless server? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The tweaks are set in a simple file in the calibre config directory called tweaks.py
Copy it over from a machine where you run the GUI Use the environment variable CALIBRE_CONFIG_DIRECTORY to control where it is read from. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I solve this by:
Here are the relevant apache rules, which are probably very similar to what you already have. Code:
<VirtualHost 69.164.218.38:443> # Stuff to set up SSL etc elided # Calibre library <Location "/library"> AuthType Digest AuthName "************" AuthDigestDomain / AuthDigestProvider file AuthUserFile ************** Require valid-user </Location> RewriteEngine on RewriteRule ^/library/(.*) http://127.0.0.1:9199/library/$1 [proxy] RewriteRule ^/library http://127.0.0.1:9199 [proxy] SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 </VirtualHost> |
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2016
Device: nook
|
Quote:
I've been looking and can't seem to find it. Server's on Debian and my laptop is running Ubuntu so I'm assuming the location would be the same on both. |
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2016
Device: nook
|
Quote:
Need to run my search as root ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It is, naturally, in "$XDG_CONFIG_HOME/calibre".
EDIT: Might I ask WHY you are running calibre as root? Generally speaking, you should run as few things as possible using the root account -- just to be on the safe side. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Binding to a Specific NIC | fiacca | Calibre | 7 | 02-18-2015 11:43 AM |
Calibre Content Server and Windows Home Server 2011 | HughMcC | Calibre | 8 | 10-01-2014 07:26 AM |
Content Server - binding to wrong networkadapter | sr71 | Library Management | 1 | 02-28-2013 03:33 AM |
calibre-server OPDS catalog - manual move to web server | HaakonME | Related Tools | 5 | 09-21-2012 03:11 AM |
500 Internal Server Error accessing content server Calibre 0.8.8 | DaddyO57 | Calibre | 1 | 07-20-2012 06:08 PM |