10-03-2013, 11:09 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2013
Device: Kindle WP
|
Calibre server on apache2 server from port 80
Hi all,
I would like to show my library using TCP port 80, but I have an apache2 server listening there. It's more days that I'm trying to set both WSGI from calibre guide and reverse proxy from guide and different sites. No way. I tried installing binary pack, recompiling from source ( first I recompiled PyQT and SIP)......... All finished with an error : "ImportError: No module named calibre.library.server.main" I've never used this kind of stuff and now my head is exploding. Could anyone help me with a SuperIgnorantDummy guide step-by-step ? : thanks for any news Last edited by fiuwe; 10-04-2013 at 03:23 AM. |
10-03-2013, 04:52 PM | #2 |
Addict
Posts: 265
Karma: 724240
Join Date: Aug 2013
Device: KyBook
|
Funny, I recently tried exactly the same just to get rid of the need to enter a portnumber. Although I only tried as reverse proxy, haven't tried the in-process route using WSGI
Here's what I did in httpd.conf made sure mod_proxy.so and mod_proxy_http.so are uncommented. in mine mod_proxy_rewrite.so was already uncommented so do not know if it is required then in the extra folder I modified http-proxy.conf and added these lines Code:
# OPDS ProxyPass /opds http://127.0.0.1:8080/opds ProxyPassReverse /opds http://127.0.0.1:8080/opds # Web Interface ProxyPass /browse http://127.0.0.1:8080/browse ProxyPassReverse /browse http://127.0.0.1:8080/browse # 'Mobile' Web Interface ProxyPass /mobile http://127.0.0.1:8080/mobile ProxyPassReverse /mobile http://127.0.0.1:8080/mobile # Required paths ProxyPass /static http://127.0.0.1:8080/static ProxyPassReverse /static http://127.0.0.1:8080/static ProxyPass /get http://127.0.0.1:8080/get ProxyPassReverse /get http://127.0.0.1:8080/get In that same file is likely a section <proxy *> I've changed that from the default restrictive order deny, allow to Order allow,deny Allow from all for testing purposes, so make sure to modify this to your requirements if you restrict access to only selected users. Last edited by At_Libitum; 10-03-2013 at 08:24 PM. |
10-03-2013, 05:36 PM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2013
Device: Kindle WP
|
Thanks a lot
It works ... more or less :P I also had to add the static folder from calibre otherwise I could not see anything. The only problem now is to show the books cover. looking at the page source code, they are linked as src="get/thumb_123_23/1234" and i dont' have an idea on how to set that on the proxy conf O.o Any idea ? Last edited by fiuwe; 10-03-2013 at 06:06 PM. |
10-03-2013, 08:22 PM | #4 | |
Addict
Posts: 265
Karma: 724240
Join Date: Aug 2013
Device: KyBook
|
Quote:
The images then likely also need another entry for the /get path, at least they started showing when adding Code:
ProxyPass /get http://127.0.0.1:8080/get ProxyPassReverse /get http://127.0.0.1:8080/get |
|
10-04-2013, 03:22 AM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2013
Device: Kindle WP
|
I thoght the same and did earlier this morning
Everything is working now Thanks for ur support |
10-04-2013, 03:58 AM | #6 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@At_Libitum: why did you reverse-proxy calibre's sub-URLS instead of using a URL prefix as described in http://manual.calibre-ebook.com/server.html, e.g. http://foo.bar.com/library or as in the manual, http://foo.bar.com/calibre? The way you did it ensures that the main calibre page will not be visible and will create maintenance problems if calibre's URLs are ever extended. Using a URL prefix eliminates both problems.
Also, you should add /ajax. |
10-04-2013, 07:09 AM | #7 | |
Addict
Posts: 265
Karma: 724240
Join Date: Aug 2013
Device: KyBook
|
Quote:
The reason I entered several paths is because when I tried it by configuring a url prefix in Calibre, I got nothing but 404's and because each of those paths I entered has a different kind of output I decided to go that route. Since I use it mostly only to access /opds from my iPhone I only started out with that one, the others got added for good measure and the occasional use...turns out that /static is required and /get only if you want to see thumbnails. At least in this form of setup and what do you mean, main calibre page? That page you get when using /localhost:8080/ is the same as when you type /localhost:8080/browse PS. FWIW, I found the opds/webinterface rather unstable. When it works it works, but when you start changing it from the default, I regularly had to kill Calibre because it got stuck when tryin to stop the content server, so I stopped experimenting and stuck with what I have now. Last edited by At_Libitum; 10-04-2013 at 07:21 AM. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems finding a port for Calibre Server | cptnemo | Library Management | 4 | 09-10-2012 02:37 AM |
500 Internal Server Error accessing content server Calibre 0.8.8 | DaddyO57 | Calibre | 1 | 07-20-2012 06:08 PM |
Calibre-server port not open issue on Fedora server | stueyboy | Devices | 0 | 08-17-2011 04:57 PM |
Can only start the Calibre Content Server once Per port | Apothe0sis | Calibre | 1 | 04-16-2011 08:25 AM |
calibre-server on port 80 problem | jquest | Calibre | 2 | 11-06-2009 06:04 AM |