Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2010, 06:29 PM   #1
dchoe
Junior Member
dchoe began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Location: Houston
Device: Kindle
content server file location

Hi, I have calibre running on a box that's also already a web server. Rather than also running the content server, I would like to just setup another virtualhost to serve the calibre content. The server is a mac running apache.

Thanks
dchoe is offline   Reply With Quote
Old 09-01-2010, 06:42 PM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
You might want to look at calibre2opds to handle such a scenario? That is how I have my system set up to deliver the content from a machine that is running apache (and that is also not capable or running calibre as it happens).

In theory I think it might also be possible to make the Content server run under apache but I have no idea how easy that would be and it also means the full calibre software install needs to be inlace.

Last edited by itimpi; 09-01-2010 at 06:46 PM.
itimpi is offline   Reply With Quote
Advert
Old 09-02-2010, 12:32 AM   #3
dchoe
Junior Member
dchoe began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Location: Houston
Device: Kindle
i took a look at calibre2opds, but would much rather use the output provided by the content server which also doesn't require the program to run every time new books are added.

it's not that i don't want the content server running, but the ability to resolve a hostname rather than the ip. so i don't mind running the content server, but would also like to setup a virtual host to it and just would need the path to the output files.
dchoe is offline   Reply With Quote
Old 09-02-2010, 12:52 AM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by dchoe;
it's not that i don't want the content server running, but the ability to resolve a hostname rather than the ip. so i don't mind running the content server, but would also like to setup a virtual host to it and just would need the path to the output files.
I am confused by quite what you mean here? If you are running the Content Server what stops you using a host name, and what are you trying to get apache to do for you? As far as I can see all apache would give you in this case is it's additional controls over security? I think I must be missing something.
itimpi is offline   Reply With Quote
Old 09-02-2010, 03:53 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,739
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dchoe View Post
Hi, I have calibre running on a box that's also already a web server. Rather than also running the content server, I would like to just setup another virtualhost to serve the calibre content. The server is a mac running apache.
Calibre is a full server, not an apache module or CGI interface. Because of this, you won't be able to make calibre into an apache virtual host.

You have three choices:
1) use a different port. All of your server's DNS names will work to access calibre. This is the standard configuration and dead-easy to set up.
2) get a second IP address. Bind apache to the first one, and 'bind' calibre to the second one. Calibre does not support IP binding, so you will need to do port translation in your firewall (2nd-ip:80 -> 2nd-ip:calibre_port). Of course, you will need to set up DNS names for the second IP.
3) Use something like Squid in reverse-proxy mode and vhost directives. See http://wiki.squid-cache.org/SquidFaq/ReverseProxy. Only the vhost(s) configured will be able to access calibre.

#3 is probably what you want, but can be complicated to set up.
chaley is offline   Reply With Quote
Advert
Old 09-02-2010, 08:44 AM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by itimpi View Post
You might want to look at calibre2opds to handle such a scenario? That is how I have my system set up to deliver the content from a machine that is running apache (and that is also not capable or running calibre as it happens).
Can you enlighten on me on the differences between running calibre2opds made available via Apache versus running the Calibre content server and its integrated /opds access?
Starson17 is offline   Reply With Quote
Old 09-02-2010, 08:45 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you can also use apache in reverse proxy mode.
kovidgoyal is offline   Reply With Quote
Old 09-02-2010, 08:55 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,739
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
you can also use apache in reverse proxy mode.
Cool! I didn't know that the apache proxy module could do reverse proxies. Look at the ProxyPass directive.
chaley is offline   Reply With Quote
Old 09-02-2010, 09:09 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,739
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Starson17 View Post
Can you enlighten on me on the differences between running calibre2opds made available via Apache versus running the Calibre content server and its integrated /opds access?
(itimpi, hope you don't mind me taking this)

calibre2opds generates a slew of static HTML pages. If you copy them into Apache's document space somewhere, then poof, you have a web site. There are no programs required other than apache. You get apache's multithreading, url rewriting, virtual hosting, etc. You can use SSL. I use calibre2opds, and use dropbox to move the pages automatically when I regenerate them. One reason I do this is that I don't want to take the trouble of installing calibre on my production web server (distro too old).

Calibre's content server is active. You must install it, with all its dependencies, and then run it and maintain it. The library must be visible to it, or probably copied to it. It uses memory, which might be precious on the server (I often run on servers with 512kb total ram). It wants to talk HTTP over TCP, meaning that anything in front of it must act like a client. It doesn't support SSL (authentication is visible) or password-per-user. However, it does give up-to-date answers, which is a very good thing.

To run calibre's content server in a single web space with other web servers (one name, one port), you must set up a 'reverse proxy' that knows where to direct the network packets, and knows how to munge them on the way back. I know how to do this with squid (have done), and today learned that apache can also do it. This doesn't solve the other problems such as old distros, but it is a good step forward.
chaley is offline   Reply With Quote
Old 09-02-2010, 09:57 AM   #10
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
To run calibre's content server in a single web space with other web servers (one name, one port), you must set up a 'reverse proxy' that knows where to direct the network packets, and knows how to munge them on the way back. I know how to do this with squid (have done), and today learned that apache can also do it. This doesn't solve the other problems such as old distros, but it is a good step forward.
I use orenosp as my reverse proxy. Calibre runs 24/7 for me anyway, but I also have an Apache server running. I was wondering if there was any advantage for me to use Calibr2opds given that I don't have any opds-aware devices. I did like the direct Calibre content server /opds access via FireFox, as it gave a nice tree structure that knew all my predefined searches and custom columns. However, it didn't seem to provide any way to actually access the books (via FireFox) other than returning to the main content server and searching.
Starson17 is offline   Reply With Quote
Old 09-02-2010, 10:20 AM   #11
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,739
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Starson17 View Post
I was wondering if there was any advantage for me to use Calibr2opds given that I don't have any opds-aware devices.
Not that I can think of, unless you prefer the navigation that calibre2opds sets up.
Quote:
I did like the direct Calibre content server /opds access via FireFox, as it gave a nice tree structure that knew all my predefined searches and custom columns. However, it didn't seem to provide any way to actually access the books (via FireFox) other than returning to the main content server and searching.
Try appending /stanza intead of /opds. I get links in firefox when I do that. I also don't see some formats, but that is OK with me because I do see epub.
chaley is offline   Reply With Quote
Old 09-02-2010, 10:30 AM   #12
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Try appending /stanza intead of /opds. I get links in firefox when I do that. I also don't see some formats, but that is OK with me because I do see epub.
Thanks. That provides links for me, too.
Starson17 is offline   Reply With Quote
Old 09-02-2010, 10:47 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's because the /stanza feed has no rel attribute on its <link> elements. Which means that firefox uses one of them as the link.
kovidgoyal is offline   Reply With Quote
Old 09-02-2010, 11:16 AM   #14
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by chaley;
(itimpi, hope you don't mind me taking this)
Feel free

I have been meaning to try to write up a clear distinction between the two cases with pros and cons for inclusion in the standard calibre2opds documentation . If you do not mind I would like to 'steal' your reply as my starting point.

I might also try and provide text to Kovid to see if he is interested in including it in the Calibre User Manual both to clarify the use of the Calibre Content Server, and also to include a link to the calibre2opds site for those who might find it more appropriate. Not sure if he will be interested or not in including it!
itimpi is offline   Reply With Quote
Old 09-02-2010, 11:20 AM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Documentation is always welcome
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File location for eBooks jgsmith Sony Reader 5 12-31-2009 10:39 AM
Kindle Content Location Restrictions Johan_ZA Amazon Kindle 7 12-21-2009 08:51 AM
Content Server thibaulthalpern Calibre 5 04-28-2009 12:56 PM
Sony Reader file location question..... krighton Sony Reader 11 07-02-2008 10:05 PM
Connect File Location? FrankBlack Sony Reader 6 03-17-2007 01:54 PM


All times are GMT -4. The time now is 10:05 AM.


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