![]() |
#1261 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Securing your content from unrestricted access from the internet and giving multiple users access to the same content is usually done with .htaccess. Just make jour password file only accessible to the Synology users with administrative privileges.
For example just user root . Code:
chown root:root password chmod 600 password So use different browsers or PC's to test. |
![]() |
![]() |
![]() |
#1262 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2016
Device: none
|
OK, thank you! It´s working now. i had to protect the cookie, so that it isn´t deleted like the others, when i close the browser.
|
![]() |
![]() |
Advert | |
|
![]() |
#1263 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2016
Device: Raspberry pi
|
500 Internal Server Error
Hi,
I Just installed COPS on a raspberry pi and its works just fine. I can select books and read it on the browser. Only when I want tot download (epub button) the epub I get an error : "500 Internal Server Error" The COPs version is: 1.0.0RC3 Its running on a Rapsberry Pi with NginX. The path of my library is: "/mnt/Boeken/Calibre Library DB/" NginX gives the following error: 2016/06/02 12:50:22 [error] 15287#0: *931 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 10.8.0.2, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.252", referrer: "https://192.168.0.252/ebooks/download/12390/Onschuldig+-+Baldacci%2C+David.epub" Has anyone an idea what the problem is? Thanks.... Last edited by fiets; 06-02-2016 at 06:51 AM. |
![]() |
![]() |
![]() |
#1264 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
The "500 Internal Server Error" is a tricky one. It could be a problem with ngnix or with COPS. And that does not help you much.
First start with reinstalling COPS with the latest version from Github: https://github.com/seblucas/cops or Code:
git clone https://github.com/seblucas/cops Then (in the COPS directory) copy config_default.php to config_local.php and link to your calibre directory with the settng $config['calibre_directory'] = './'; in config_local.php. Any errors when you connect to COPS with http://<IP-RaspberryPi>/cops/checkconfig.php ? The calibre directory should have the accessibility rights 755 (chmod -R 755 calibre_directory). Also try to (re)name the directory without "spaces". On my Pi (with Apache) it works. |
![]() |
![]() |
![]() |
#1265 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2016
Device: Raspberry pi
|
Thanks for your reaction...
The config check says everthing is OK. I also tried to make a virtual server with port 83. Then, also, everything works fine but when i download an ebup I get a differtent error: 404 Not Found. I also tried a directory name with no spaces (with a symbolic link) but the problem stays... ik think it is a nginx configuration issue... nginx log says: error 32039#0: /var/www/ebooks/download/10374/Doelwit+-+Baldacci,+David.epub" failed (2: No such file or directory) And /var/www/ebooks/download indeed doesn't exists... Last edited by fiets; 06-03-2016 at 06:11 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#1266 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 143
Karma: 76596
Join Date: Feb 2015
Location: Portugal
Device: Kobo Aura HD
|
![]() Quote:
See here the files and etdits required https://github.com/seblucas/cops/pull/239 |
|
![]() |
![]() |
![]() |
#1267 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2016
Device: Raspberry pi
|
Quote:
I changed: $config['cops_use_url_rewriting'] = "1"; to: $config['cops_use_url_rewriting'] = "0"; |
|
![]() |
![]() |
![]() |
#1268 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@fiets
Great that your problem is solved! ![]() But why did you use $config['cops_use_url_rewriting'] = "1"; when "0" is the default value? Nevermind, enjoy COPS! ![]() |
![]() |
![]() |
![]() |
#1269 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2016
Device: dibuksaga
|
Hello
I need help. I have created calibreCOPS to my NSA325, work perfect ![]() How can I make password acces? I created .htpasswd and edited htaccess but not work. THX in advance |
![]() |
![]() |
![]() |
#1270 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Quote:
How and where (path) did you create .htpasswd and with what rights? If it does not work then you could try a setting in config_local.php: Code:
/* * Enable PHP password protection (You can use if htpasswd is not possible for you) * If possible prefer htpasswd ! * array( "username" => "xxx", "password" => "secret") : Enable PHP password protection * NULL : Disable PHP password protection (You can still use htpasswd) */ $config['cops_basic_authentication'] = NULL; Code:
$config['cops_basic_authentication'] = array("username" => "Azazael", "password" => "s3cr3t"); |
|
![]() |
![]() |
![]() |
#1271 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2016
Device: dibuksaga
|
Quote:
![]() I used this tool http://www.htaccesstools.com/htpasswd-generator/ File path : /i-data/38e0c4cc/.system/zy-pkgs/gui/CalibreCOPS/.htpasswd File permissions : -rwxr-xr-x 1 admin everyone No changes in .htaccess I thought config file. Worked if I will add this code: $config['cops_basic_authentication'] = array("username" => "Azazael", "password" => "s3cr3t"); If I will add this code: $config['cops_basic_authentication'] = NULL; not worked, only blank page. Last edited by Azazael; 06-06-2016 at 10:42 AM. |
|
![]() |
![]() |
![]() |
#1272 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
The lines on the bottom of the .htaccess file in the COPS directory should look like: (Remove the relevant # at the beginning of the last 7 lines. )
Code:
########################################### # Uncomment if you wish to protect access with a password ########################################### # If your covers and books are not available as soon as you protect it # You can try replacing the FilesMatch directive by this one # <FilesMatch "(index|feed)\.php"> # If helps for Sony PRS-TX and Aldiko, beware fetch.php can be accessed # with authentication (see $config ['cops_fetch_protect'] for a workaround). ########################################### <FilesMatch "\.php$"> AuthUserFile /i-data/38e0c4cc/.system/zy-pkgs/gui/CalibreCOPS/.htpasswd AuthGroupFile /dev/null AuthName "Restricted Access" AuthType Basic Require valid-user </FilesMatch> If you use the setting in config_local.php do not change the .htaccess file from what is was when installed. Also no .htpasswd needed. |
![]() |
![]() |
![]() |
#1273 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2016
Device: dibuksaga
|
I did everything possible, I changed .htpasswd location, I use another htpasswd generator....still not working
I have something wrong in my files ? config_local.php Spoiler:
htaccess Spoiler:
config_default.php Spoiler:
config.php Spoiler:
|
![]() |
![]() |
![]() |
#1274 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
As far as I can see and understand there is nothing ( .htaccess related) wrong with your config_local.php and .htaccess files.
It's possibly a problem with your Zyxel web server that possibly does not support .htaccess (?). What webserver do you use? Maybe you need to change some config files. If this is true just use the setting in config_local.php. |
![]() |
![]() |
![]() |
#1275 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2016
Device: dibuksaga
|
I found this info, this is it ?
COPS Configuration Check Spoiler:
Other info Spoiler:
|
![]() |
![]() |
![]() |
Tags |
calibre opds, dns, kobo aura, synology |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 10:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 06:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |