View Single Post
Old 09-26-2013, 02:47 AM   #1
SirMossi
Junior Member
SirMossi began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2013
Device: Sony PRS T2
problems accessing calibre-server with proxy configured

Hello,

I try to setup a calibre-server with apache authentication. The main approach works just fine. But I have some problems when accessing the library from Aldiko app on android.

Here my configuration:

I've started the calibre-server with the following command on port 8080:
Code:
calibre-server --with-library=\"$CALIBRE_LIBRARY_PATH\" -p $PORT --pidfile=$PIDFILE --daemonize
Now I can access the library using the URL http://domain.tld:8080
This works also in Aldiko reader.

To make it more secure, I've configured a apache virtual host:
Code:
<VirtualHost *:80>
	ServerAdmin mail@domain.tld
	ServerName calibre.domain.tld
	ServerAlias calibre.*
	ErrorLog /var/log/apache2/calibre-error_log
	CustomLog /var/log/apache2/calibre-access_log common
	ProxyPass / http://localhost:8080/
	ProxyPassReverse / http://localhost:8080/
	SetEnv force-proxy-request-1.0 1
	SetEnv proxy-nokeepalive 1
	<Location />
		Deny from all
		AuthType Basic
		AuthName "Calibre"
		AuthUserFile /etc/apache2/passwd
		Require valid-user 
		Satisfy Any
	</Location>
</VirtualHost>
I've tried this from browser and it just works fine using the url http://calibre.domain.tld. Also Aldiko could access the library. I have to enter my user and my password and all is Ok.

To make it more secure, I've closed the port 8080 in firewall to deny access this port from outside.

Code:
iptables -A INPUT -d domain.tld -p tcp --destination-port 8080 -j REJECT
Tried from browser and it works. Now it's not anymore possible to access the library with the direct path to the port, but with my virtual host domain I could access it.

But from Aldiko it does not work. Aldiko does not load any images, js files and so on. Only the main index.html is loaded without any formattings. I've checked my apache log files and see, that all loaded files returned a 404 error.

What did I configured wrong? Or is it a problem from Aldiko? I hope that someone here already set up such a server and could help me to solve the problem.

Thank you at all
SirMossi is offline   Reply With Quote