01-17-2017, 07:01 PM | #1396 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
@mariosipad
Here is the "Web" directory: Code:
[/share/CACHEDEV1_DATA/Web] # ls -l drwxrwxrwx 2 admin administ 4096 Jan 12 09:47 @Recycle/ lrwxrwxrwx 1 admin administ 37 Jan 15 09:26 COPS -> /share/CACHEDEV1_DATA/.qpkg/COPS/COPS/ [/share/CACHEDEV1_DATA/Web] # Code:
https://mydomain.pagekite.me/cops/index.php - I get the Pagekite login menu. - I put in my username and password - I get the Apache 403 error That is because "mydomain" gets resolved to go to Pagekite, which then does its thing on my port 80. However, if I put in my browser: Code:
http://192.168.x.xxx/COPS/index.php It seems to me, in my inexperience with website stuff, that Apache config file(s) might need a tweak. But I have no clue what/where or the risks, if any! I am certainly open to suggestions!! |
01-17-2017, 07:45 PM | #1397 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Not that I think it will help, but ......
Try http://mydomain.pagekite.me/COPS/index.php So COPS in capitals. It's way after midnight here and I need my zzzzzz's. I will explore another idea in about 12 hours. |
Advert | |
|
01-17-2017, 08:04 PM | #1398 | |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
|
|
01-18-2017, 06:09 AM | #1399 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Let's take COPS out of the equation for now and just focus on PageKite.
Can you save (with a text editor) the following code in a file named test.php: Code:
<html> <head> <title>PHP Test</title> </head> <body> <?php phpinfo(); ?> </body> </html> What do you see (does it work) when you http://192.168.xxx.xxx/test.php and http://mydomain.pagekite.me/test.php? |
01-18-2017, 12:05 PM | #1400 | |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
I did save it as an html page, so if any of the info is needed, I have it. |
|
Advert | |
|
01-18-2017, 12:58 PM | #1401 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Ok!!
That means that PageKite seems to be working. COPS should be working too. Just to try it out: - copy COPS from it"s present location on your QNAP to ./web/cops-test - maybe edit config_local.php (don't think it's needed) - http://192.168.xxx.xxx/cops-test - http://mydomain.pagekite.me/cops-test/checkconfig.php And? (fingers crossed) |
01-18-2017, 02:08 PM | #1402 | |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
Code:
lrwxrwxrwx 1 admin administ 37 Jan 15 09:26 COPS -> /share/CACHEDEV1_DATA/.qpkg/COPS/COPS/ drwxrwxrwx 8 admin administ 4096 Jan 18 10:52 cops/ drwxrwxrwx 8 admin administ 4096 Jan 18 10:39 cops-test/ And, if I enter http://mydomain.pagekite.me/cops, I do get the proper main cops menu with my specified Calibre libraries but no login screen of course since I bypassed pagekite. So, again anticipating, how to I get the version in "cops" to be the default? |
|
01-18-2017, 02:51 PM | #1403 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Great!
Do I understand correctly that you want http://mydomain.pagekite.me to point to cops? (Instead of http://mydomain.pagekite.me/cops ?) Edit: Did you also try to actually download an epub or pdf? Last edited by mariosipad; 01-18-2017 at 03:06 PM. |
01-18-2017, 03:15 PM | #1404 | |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
It set up out-of-the-box that way when I installed in Linux Mint. My users are used to that. Here is some more detail why. My subdomains at Pagekite go something like this: lib1-name.pagekite.me lib2-name.pagekite.me etc for a current total of 6 libs. That was necessary because all libraries rolled into one was simply to slow for searching due to size. So in Calibre I broke it down to 6 individual libraries. So, 6 Calibre Server daemons running on 6 ports, so lib1-6 at pagekite. Now, COPS allows me to use a single port that points to the still separate 6 Calibre libraries that users can switch between. If that were the end of it, I would not ask for more, but If this does not work out for some reason and I have to go back to the 6 urls for users to use like before, I don't want to have to create 6 COPS instances...if that is even possible. And, I do need to provide individual logins for 40+ users. Currently that is in the Pagekite config file, and going directly to the 'cops' folder bypasses that! So, yes, I would like to keep the Pagekite login structure unless I can do the same thing in COPS or Apache? [edit] On second thought, If I could manage the login requirements in COPS or Apache or other locally, then I could eliminate Pagekite and get a single domain registered for probably little $$. So that is a good alternative if available and secure. Last edited by MontyJ; 01-18-2017 at 03:39 PM. Reason: Clarify |
|
01-18-2017, 04:12 PM | #1405 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
First:
http://mydomain.pagekite.me (and lib1-name.pagekite.me and lib2-name.pagekite.me etc) will all point to http://localhost and not to http://localhost/cops . But if you make a file named .htaccess (pay attention to the .) in the ./web directory with code: Code:
RewriteEngine On RewriteRule ^$ /cops [l] Is it? Easier is to let all of your users get used to using just 1 (one) url. Second: 40 unique users with unique usernames and passwords is a lot but can be done by apache. A - is there an utility named htpasswd on your QNAP? Can you find out? If not, there are work arounds. B - will follow if A is answered ;-) I thought you needed to use PageKite because of frequent IP changes? Buying a domain name means that you yourself must make sure that the domain name points to your (changing) external IP. It's also possible to use a dynamic DNS service (ranging from free to expensive). These services sometimes have an app that does the changing for you. But for the moment lets not complicate things.) |
01-18-2017, 05:55 PM | #1406 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
@mariosipad,
Yes, Pagekite does provide a dynamic ip connection, but won't others provide similar capabilities? Hmmm, but will they eliminate the need to port forward like Pagekite? Not a big deal, as I assume apache is secure... Ok, I have added the line to .htaccess, which is in the cops dir: Code:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ /cops [l] RewriteRule ^download/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub [L] RewriteRule ^download/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3 [L] RewriteRule ^download/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub [L] RewriteRule ^download/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2 [L] </IfModule> Code:
/share/CACHEDEV1_DATA/.qpkg/QKVM/opt/bin/htpasswd /mnt/ext/opt/apache/bin/htpasswd - Security Level - Network Access Protection - Certificate & Private Key Under Security Level Select - Allow all connections (selected) - Deny all connections on the list - Allow connections from the list only - Area to enter items in list (no current entries) Under Network Access Protection - Enabled - Selectable list of: SSH, Telnet, HTTP(S), FTP, SAMBA, AFP None are selected at this point. Under Certificate & Private Key - Download Certificate - Download Private Key - Restore Default Certificate & Private Key - No certs or keys entered; never been in this menu before. I also see a Control Panel > Network Access section with: - Service Binding - Proxy - DDNS Service (all services are checked for binding) But, no "Password" or (htpasswd) that I have found so far. |
01-18-2017, 06:32 PM | #1407 |
Guru
Posts: 723
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@MontyJ
The main advantage of a service like PageKite is that there is no need to open ports in your modem/router. Opening ports is the main security risk for any local network. And unless you *think* you know what you are doing do not open any ports. So for the time being you better stick with PageKite. And you assume wrong, apache is only as safe as you set it up. And I fear your setup at this moment is just not safe enough to use with direct access from the www. Using PageKite is what I call "security through obscurity" and in your case safe enough! Please do not add the lines Code:
RewriteEngine On RewriteRule ^$ /cops [l] ... more in the next post. (later) Edit: later regrettably will become tomorrow. I ran into a problem. Something I know that has worked in the past, now gives me an ugly error. I have to fix this before I can tell you with confidence that it will work. Edit2: I seem to have fixed it (don't know how, but it works). I keep up the suspense. As it is too late here in Europe (almost an hour after midnight) to continue, you'll have to wait a few hours. I hope you don't mind? Have a nice day! Last edited by mariosipad; 01-18-2017 at 07:54 PM. |
01-18-2017, 08:14 PM | #1408 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
@mariosipad,
You won't hear any complaints from me about getting some well deserved rest! The first line was already in that file, I added only the second/new line below it. So I am a little unclear of your intentions on that. I will, for now, proceed with your instructions exactly and remove both lines and put them in a new file. Then will wait for you being back to proceed with any changes. Thanks again for the efforts!! |
01-18-2017, 10:53 PM | #1409 |
Enthusiast
Posts: 49
Karma: 500000
Join Date: Dec 2011
Device: Kobo Libra 2
|
|
01-19-2017, 12:29 AM | #1410 | |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
If you haven't already, you can check them out at pagekite.net. The cost is right at $3/mo, tho if you plead hardship you can get it for free. The only drawback is the lack of quick support, and the delayed responses are often erratic. But if you are a little experienced with web/networking stuff, their online documentation is pretty extensive. I am pretty much a noob at this, and even I was able to get it set up in Linux with little effort and only one question to them I couldn't find the answer to, tho I had to ask the question a second time, LoL. QNAP, however, threw in a bunch of curves due to the way they implement QTS and I would be lost w/o Mario's great help. |
|
Tags |
calibre opds, dns, kobo aura, synology |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 03:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 11:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 09:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 07:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 10:57 AM |