I have the server and client installed on my laptop. I have the client on my iphone. I can login to nextcloud on the laptop. But the iphone keeps insisting it can’t see the server.
I enter IP (https://192.168.0.52/nextcloud/) and username and password. If I use http instead of https, then in addition to saying it can’t find the server, it says “Request failed: unauthorized (401)”
This is on my home network. Both devices are on the same subnet.
It seems to me this has to be a permissions problem somewhere, but I have no idea what to tweak. Or maybe there’s a config file I need to edit?
I hope someone can help because this has been megafrustrating.
I found a remote.php under /var/www/nextcloud/. So I tried copying that to /var/www/html/ (as root of course), but it doesn’t help matters.
Looking at config.php in /var/www/nextcloud/config/, it looks like this line 'htaccess.RewriteBase' => '/' may be necessary to point to web root, so I added that to config.php as 'htaccess.RewriteBase' => '/nextcloud' since that’s where my nextcloud seems to be. Doesn’t seem to do anything. I restarted apache, but I’m not sure how you restart nextcloud.
How do you restart nextcloud?
I’ll try turning everything off an on again, but it would be nice to know a more elegant method.
As for Pretty-Urls, I’m stuck. I searched and searched, but it seems to go somewhere in the config files for a given package or for apache. Not even sure about that. So I’d definitely need a specific line and which config file it goes in.
Still struggling with this. Not constantly, of course. It’s too frustrating for that.
What I’m getting now is a 500 error on the phone when I try to connect. (Nextcloud comes up normally on my laptop browser.)
Googling around, it seems the likeliest reason to get a 500 error is that the permissions are wrong on my server (i.e. my laptop).
The directories are all 750 (dwrxr-x—) and the files, including all scripts, are all 640 (rw-r-----). I didn’t change anything there post installation. Owner is mostly root. Group is www-data.
I’m reluctant to do a global change permissions on the files to 755 (rwxr-xr-x) which is what I’ve seen recommended for a 500 error. There are a lot of files, and some of them surely have very restricted permissions for a reason. Right?
Can anyone out there tell me what’s a safe way to proceed without just setting the whole damn thing to 777??
I think at least part of the problem is that nextcloud is looking for executables in the wrong place.
While owner was still root: I had this error message in apache’s error.log:
PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
PHP Fatal error: Unknown: Failed opening required '/var/www/html/remote.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
There’s only an index.php in my /var/www/html/ but I copied remote.php from /var/www/nextcloud to /var/www/html and changed owner and group to www-data.
Now the error message is:
PHP Warning: require_once(/var/www/html/lib/base.php): failed to open stream: No such file or directory in /var/www/html/remote.php on line 110
PHP Fatal error: require_once(): Failed opening required '/var/www/html/lib/base.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/remote.php on line 110
Now it gets as far as line 110, and it’s missing “base.php” presumably the next script it needs? So it’s looking in the wrong place?
How do I tell it where to look? I think I’ve already done that with ‘htaccess.RewriteBase’ => ‘/nextcloud/’ but I’m still getting that error message. Aargh!
Oh, also, is it enough to just restart apache after changes? Do I need to reboot the phone after each change? (I hope not! I tried that once and it didn’t seem to make a difference.) Presumably I don’t have to reboot the laptop/server?