Quote:
Originally Posted by mariosipad
@MontyJ
After re-rereading some of your previous post I finally understand (hopefully) something about your "complicated" setup.
You use the QNAP Operating System "QTS" with Ubuntu "on top".
Where is COPS? In the QNAP webserver (/web/cops) or in a webserver (apache) in Ubuntu (/var/www/html/cops) and where are the Calibre libraries located?
If you access COPS locally from your PC (http://<internal-IP-QNAP>/cops) does it work?
If your QNAP has a screen attached to it and can run a browser can you access COPS ( http://localhost/cops)? Or use remote access
From where is PageKite.py running and started? From QTS or from Ubuntu and with what user (root, admin, local-QTSuser, local Ubuntu-user)?
Then without fiddling to much with pagekite.rc (located in what home directory, QTS or Ubuntu /home/user?) where does PageKite "land"?
If you use port 80 it should "land" on http://localhost .
With http://mydomainname.pagekite.me/cops you should connect to http://localhost/cops
This does not answer your Q1, but ..........
With regards to Q2: You cannot change ports in COPS, but you can change ports in the webserver. But with PageKite there is no need. There are no ports open in your router for port forwarding. And that is quite secure! 
Setting basic authentication (always a good idea) ca be done in COPS and or the webserver (.htaccess). Virtual hosts are also possible but not needed for your setup.
I hope this helps you think about a solution to your problem(s). First fix Q1 then Q2 is easy.
|
Mario,
Thanks for the detailed reply!
But I see I have possibly confused things, probably by posting unnecessary details, LoL.
1. Yes, my original question was using Ubuntu under QTS. But Ubuntu really isn't "on top" as you put it. It installs in its own "parallel" install. The Ubuntu fs is 'normal' linux with normal linux structures. The QTS fs is not 'normal' linux due to their unique tweaks to provide some pretty nice NAS features. The two fs's run simultaneously.
I did this because at that time I could not make Pagekite work in QTS. I installed what QNAP calls the Linux Station, which loads more or less 'normal' Ubuntu in its own fs space. I was then able to get Pagekite to work in Ubuntu, but could not figure out how to get COPS to see the Calibre libraries, which were located over in the QTS fs. That was my original starting questions scenario.
2. Then you gave me the idea to recheck if python was installed in QTS. It wasn't. So I went back to the QTS fs and installed python v2.7.3. That let me proceed with my original quest of getting COPS+Pagekite to work under QTS, not Ubuntu! We can leave Ubuntu out of the current setup question! The Apache 403 error I asked about is using COPS+Pagekite in the original QTS fs.
Ok, now on to location details.
When I SSH into the QTS fs, here are the paths/contents I get.
Initial entry to QNAP NAS at the "root" folder. I login as "admin":
Code:
[~] # ls -a
./ .bashrc .ssh@
../ .buzzer_warnning.conf .vimrc
.BitTornado@ .docker/ index_default.html
.bash_history .pagekite.org pagekite.log
.bash_logout .pagekite.rc
.bash_profile .profile
[~] #
NOTE: When I ran pagekite.py, this is the default location where it placed the (hidden) pagekite.rc config file and pagekite.log file as default. I guess I could move these files, but since Pagekite is working and seeing COPS, I want to leave it alone unless it is causing the Apache 403 error.
If I then go to "/" here is where the normal QTS fs shows up:
Code:
[~] # cd /
[/] # ls -la
drwxr-xr-x 22 admin administ 540 Jan 15 09:26 ./
drwxr-xr-x 22 admin administ 540 Jan 15 09:26 ../
lrwxrwxrwx 1 admin administ 32 Jan 15 09:26 KVM -> /share/CACHEDEV1_DATA/.qpkg/QKVM/
drwxr-xr-x 2 admin administ 1680 Jan 15 09:26 bin/
drwxr-xr-x 15 admin administ 20160 Jan 16 03:00 dev/
drwxr-xr-x 28 admin administ 3100 Jan 16 14:28 etc/
drwxr-xr-x 2 admin administ 40 Jan 15 09:23 flashfs_tmp/
lrwxrwxrwx 1 admin administ 13 Jan 15 09:23 hd_root_tmp -> /mnt/HDA_ROOT/
drwxr-xr-x 4 admin administ 80 Dec 13 12:17 home/
drwxr-xr-x 6 admin administ 2540 Jan 15 09:26 lib/
drwxr-xr-x 2 admin administ 160 May 3 2015 lib64/
lrwxrwxrwx 1 admin administ 11 Jan 15 02:22 linuxrc -> bin/busybox*
drwx------ 2 admin administ 40 Dec 13 12:18 lost+found/
drwxr-xr-x 9 admin administ 200 Jan 16 14:28 mnt/
drwxr-xr-x 2 admin administ 40 Jan 15 02:22 new_root/
lrwxrwxrwx 1 admin administ 38 Jan 15 09:26 opt -> /share/CACHEDEV1_DATA/.qpkg/Entware-ng/
lrwxrwxrwx 1 admin administ 19 Jan 15 02:22 php.ini -> /etc/config/php.ini
dr-xr-xr-x 428 admin administ 0 Jan 15 02:22 proc/
drwxr-xr-x 3 admin administ 320 Jan 17 10:16 root/
drwxr-xr-x 2 admin administ 40 Jan 15 09:25 rpc/
drwxr-xr-x 5 admin administ 100 Jan 15 09:27 run/
drwxr-xr-x 2 admin administ 8620 Jan 15 09:26 sbin/
drwxrwxrwt 31 admin administ 740 Jan 15 09:25 share/
dr-xr-xr-x 12 admin administ 0 Jan 15 02:22 sys/
drwxrwxrwx 19 admin administ 3060 Jan 17 10:40 tmp/
drwxr-xr-x 10 admin administ 200 Jan 16 14:29 usr/
drwxrwxrwx 10 admin administ 660 Jan 17 10:39 var/
[/] #
[/] # cd home
[/home] # ls -l
drwxr-xr-x 3 admin administ 180 Jan 15 09:25 Qhttpd/
drwxr-xr-x 12 admin administ 660 Jan 15 09:26 httpd/
[/home] #
NOTE: The question about a "home" install for pagekite came up. This is the contents of "home" and there are no other subfolders here.
Ok, the actual pwd paths to various stuff.
COPS location. Note the Ubuntu location shows up as well. It is not used currently!:
Code:
[/] # find / -name COPS -type d
/share/CACHEDEV1_DATA/.qpkg/COPS
/share/CACHEDEV1_DATA/.qpkg/COPS/COPS
/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/rootfs/home/admin/Web/COPS
find: ‘/proc/12211’: No such file or directory
[/] #
[/] # cd /share/CACHEDEV1_DATA/Web/COPS
[/share/CACHEDEV1_DATA/Web/COPS] # pwd
/share/CACHEDEV1_DATA/Web/COPS
Ok, here is where pagekite is located:
Code:
[/] # find / -name pagekite.py -type f
/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/rootfs/usr/local/bin/pagekite.py
/usr/local/bin/pagekite.py
[/] #
Again, pagekite.py shows up in the Ubuntu area, but ASFAIK, it is not being used. I put it in a matching directory only for conformity. I guess it could be put anywhere as long as it is in the admins run path. The Ubuntu install will be removed if I can get it to work here in the QTS fs, and it looks like I am very close.
So, there are the details. Hopefully they help. I tend to overdue the details as I am pretty new at this and want to eliminate assumptions by filling in all the gaps I can.
Here is what I see when I run pagekite.py:
Code:
[/] # pagekite.py
>>> Hello! This is pagekite.py v0.5.8e. [CTRL+C = Stop]
Connecting to front-end 173.230.xxx.xxx:xxx ...
- Protocols: http http2 http3 https websocket irc finger httpfinger raw
- Protocols: minecraft
- Ports: 79 80 443 843 2222 3000 4545 5222 5223 5269 5670 6667 8000 8080
- Ports: 8081 9292 25565
- Raw ports: 22 virtual
Quota: (my personal acct data)
Connecting to front-end 35.160.xxx.xxx:xxx ...
~<> Flying localhost:80 as https://mydomain.pagekite.me/
<< pagekite.py [dyndns] Updating DNS for mydomain.pagekite.me...
Since it appears to be working at this point, I point my browser to:
Code:
mydomain.pagekite.me
Then I get a Pagekite login window. The users and passwords are setup in in the pagekite config file. The login windows shows:
Code:
"Authentication Required"
http://mydomain.pagekite.me is requesting your username and password. The site says: “PageKite”
Then I simply enter my username and password in the fields provided.
This is where I get the Apache 403 error:
Code:
Forbidden
You don't have permission to access / on this server.
Apache Server at mydomain.pagekite.me Port 80

Whew! Too many details I know, Hopefully enough to point to what I did wrong, or haven't done at all that I should!