|
|
#1 |
|
Member
![]() Posts: 18
Karma: 12
Join Date: Aug 2013
Device: android kindle app, FB Reader, several tablets
|
calibre server root folder
where can I locate the root folder for the content server? I need to verify ownership so that I can get a custom SSL certificate.
thanks! |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no root folder, the server is dynamic. I'm guessing you are using lets encrypt? In which case you need to either modify the code (for example in server/content.py or simpler, just turn off the server temporarily and run nginx/apacche/simplehttpserver while you are verifying your domain ownership.
|
|
|
|
|
|
#3 |
|
Member
![]() Posts: 18
Karma: 12
Join Date: Aug 2013
Device: android kindle app, FB Reader, several tablets
|
Good guess!
Well, I have it set up using apache proxy, so apache is already running, accepting connections on port 80 and forwarding them locally to 8080. So, would I have to manipulate my vhost file for that? That sounds like what you are saying. I like the webroot method of verification, it's awfully good for automating my set up.Where is the file to alter? I just went looking for content.py and haven't seen it... |
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If it is already behind apache, then you dont need to do anything in calibre, simply add the webroot rules in the apache conf file.
|
|
|
|
|
|
#5 |
|
Member
![]() Posts: 18
Karma: 12
Join Date: Aug 2013
Device: android kindle app, FB Reader, several tablets
|
Solved
I got it to work by making a universal vhost alias for ./well-known like this
Code:
Alias /.well-known /var/www/LEwebroot/.well-known
<Directory /var/www/LEwebroot/.well-known>
Options FollowSymlinks
AllowOverride All
Order allow,deny
Require all granted
</Directory>
Code:
<VirtualHost *:80>
ServerName my.vhost.com
RewriteEngine on
### For letsencrypt ###
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*) http://another.path.to.the.alias.com/$1 [P]
### Letsencrypt fin ###
RewriteRule ^(.*) http://localhost:8080/$1 [proxy]
RewriteRule ^ http://localhost:8080 [proxy]
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</VirtualHost>
EDIT: Nevermind. That breaks the server
Last edited by josh.p.23; 12-05-2015 at 04:44 AM. |
|
|
|
|
|
#6 |
|
Member
![]() Posts: 18
Karma: 12
Join Date: Aug 2013
Device: android kindle app, FB Reader, several tablets
|
So, with that breaking the server, how do I get the calibre redirect to happen while ignoring that one particular url without breaking the server? Or is that... only a dream... a dream...a dream.........
|
|
|
|
|
|
#7 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's been years since I've used apache, but surely it has some form of rule precedence. Give the rule for .well-known a higher precedence.
|
|
|
|
|
|
#8 |
|
Member
![]() Posts: 18
Karma: 12
Join Date: Aug 2013
Device: android kindle app, FB Reader, several tablets
|
Hey, so I did finally get this to work. I actually shouted with joy and woke up my kids when it finally did!
For clarity's sake:
To share the solution:
I wanted to share that solution here because it was such a hassle for me, and hopefully someone can lean on this work. Happy Day. |
|
|
|
![]() |
| Tags |
| calibre-server, encryption, letsencrypt, regex, ssl |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reimport books from another folder to Calibre folder structure? | mendhak | Calibre | 2 | 10-11-2013 02:18 AM |
| changing default folder root ofr odyssey | xpj | Library Management | 8 | 05-14-2013 03:29 PM |
| Calibre content server -- save to a folder? | Woodstonian | Kobo Reader | 1 | 11-02-2012 09:18 PM |
| News Downloads Auto Saved To Root Folder, in EPUB Format | nkormanik | Library Management | 7 | 04-09-2011 09:02 PM |
| News Downloads Auto Saved To Root Folder, in EPUB Format | nkormanik | Recipes | 0 | 04-08-2011 04:25 AM |