Changed hostname, now i can SEE folders/files, but can not access them

So I had a working NC11 install with DynDNS through NoIP, but changed my dyndns service (from no-ip to Afraid.com) to use a domain name I already had. Everything seems to point back to the server (even my wiki that i installed in a completely different folder works ok). I got new ssl certs for the new domain name…again, works ok with wiki, and with NC11…I can log in and navigate through all the directories (user and admin) on a secure connection, but when I try to access a file (to view or download, or upload new files), I get “Unknown error 503”. Because other sites on the server seem to work ok, it seems to be limited to just NC11. I also made sure that www-data:www-data had ownership of the data storage folder (though that had not changed).
So, not sure what I did (or didn’t) do, but I need some assistance, please.

Server is Ubuntu 16.04
Apache2
Maria DB

Thanks for any help you can provide.

Can you check the Apache log file and provide the section of the error? Make sure to check both the access and error logs.

not sure exactly what to look for, but here is the output of tail /var/log/apache2/error.log

[Sat Apr 22 13:01:03.220872 2017] [mpm_prefork:notice] [pid 1961] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:01:03.220978 2017] [core:notice] [pid 1961] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:03:54.262181 2017] [mpm_prefork:notice] [pid 1961] AH00169: caught SIGTERM, shutting down
[Sat Apr 22 13:04:25.115903 2017] [mpm_prefork:notice] [pid 1652] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:04:25.116200 2017] [core:notice] [pid 1652] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:15:00.744353 2017] [:error] [pid 1709] [client 180.76.15.30:43562] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 13:29:24.418493 2017] [mpm_prefork:notice] [pid 1652] AH00169: caught SIGTERM, shutting down
[Sat Apr 22 13:29:25.518771 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:29:25.518857 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:46:45.357670 2017] [mpm_prefork:notice] [pid 3470] AH00171: Graceful restart requested, doing restart
[Sat Apr 22 13:46:45.418136 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:46:45.418153 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:49:58.934276 2017] [mpm_prefork:notice] [pid 3470] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
[Sat Apr 22 13:49:58.985940 2017] [ssl:warn] [pid 3470] AH01906: 607961fede68aa933450de47b3de04bd.ca3780c089a65bb18753a972bc18bd6f.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Apr 22 13:49:58.986422 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:49:58.986428 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:50:05.696376 2017] [mpm_prefork:notice] [pid 3470] AH00171: Graceful restart requested, doing restart
[Sat Apr 22 13:50:05.765212 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:50:05.765235 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:50:14.258131 2017] [mpm_prefork:notice] [pid 3470] AH00171: Graceful restart requested, doing restart
[Sat Apr 22 13:50:14.318739 2017] [ssl:warn] [pid 3470] AH01909: burcham.gotdns.ch:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 22 13:50:14.318880 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:50:14.318886 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:50:25.736010 2017] [mpm_prefork:notice] [pid 3470] AH00171: Graceful restart requested, doing restart
[Sat Apr 22 13:50:25.798098 2017] [ssl:warn] [pid 3470] AH01909: burcham.gotdns.ch:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 22 13:50:25.798253 2017] [mpm_prefork:notice] [pid 3470] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 13:50:25.798258 2017] [core:notice] [pid 3470] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 13:51:00.722294 2017] [ssl:error] [pid 4255] [client 64.41.200.105:53808] AH02042: rejecting client initiated renegotiation
[Sat Apr 22 14:08:00.893352 2017] [mpm_prefork:notice] [pid 3470] AH00169: caught SIGTERM, shutting down
[Sat Apr 22 14:08:02.010528 2017] [mpm_prefork:notice] [pid 4625] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 14:08:02.010609 2017] [core:notice] [pid 4625] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 14:33:07.057748 2017] [:error] [pid 5039] [client 68.57.70.238:44558] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 14:33:07.112693 2017] [:error] [pid 4634] [client 68.57.70.238:49712] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 14:33:17.867511 2017] [:error] [pid 5060] [client 68.57.70.238:41281] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 14:33:20.652492 2017] [:error] [pid 5060] [client 68.57.70.238:41281] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 15:16:58.651137 2017] [:error] [pid 5059] [client 188.226.130.60:42251] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:24:43.772310 2017] [:error] [pid 5402] [client 188.226.130.60:56709] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:28:21.677742 2017] [:error] [pid 4632] [client 188.226.130.60:46976] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:31:08.132329 2017] [mpm_prefork:notice] [pid 4625] AH00169: caught SIGTERM, shutting down
[Sat Apr 22 15:31:09.252861 2017] [mpm_prefork:notice] [pid 5670] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 15:31:09.252940 2017] [core:notice] [pid 5670] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 15:34:13.459110 2017] [:error] [pid 5680] [client 188.226.130.60:47974] script ‘/var/www/html/index.php’ not found or unable to stat
root@burcham:/var/log/apache2# tail error.log
[Sat Apr 22 14:33:07.112693 2017] [:error] [pid 4634] [client 68.57.70.238:49712] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 14:33:17.867511 2017] [:error] [pid 5060] [client 68.57.70.238:41281] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 14:33:20.652492 2017] [:error] [pid 5060] [client 68.57.70.238:41281] script ‘/var/www/html/status.php’ not found or unable to stat
[Sat Apr 22 15:16:58.651137 2017] [:error] [pid 5059] [client 188.226.130.60:42251] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:24:43.772310 2017] [:error] [pid 5402] [client 188.226.130.60:56709] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:28:21.677742 2017] [:error] [pid 4632] [client 188.226.130.60:46976] script ‘/var/www/html/index.php’ not found or unable to stat
[Sat Apr 22 15:31:08.132329 2017] [mpm_prefork:notice] [pid 4625] AH00169: caught SIGTERM, shutting down
[Sat Apr 22 15:31:09.252861 2017] [mpm_prefork:notice] [pid 5670] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Sat Apr 22 15:31:09.252940 2017] [core:notice] [pid 5670] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat Apr 22 15:34:13.459110 2017] [:error] [pid 5680] [client 188.226.130.60:47974] script ‘/var/www/html/index.php’ not found or unable to stat

Does this help?

Best practice is to have separate logs for each VirtualHost, I assume this log is specific for NC.

From what I can see it has problems finding the files status.php and index.php in the folder /var/www/html. Is this the folder in which NC is installed? If not it could be that your VirtualHost config is not correct.

ok, it may be the vhost then. would that prevent only NC from working properly…while others still ok?

It can do yes since each vhost have their own configuration settings.

As from the error file it shows it is trying to access the files in /var/www/html. If this isn’t the RootDocument folder of NC it would mean for some reason a different vhost is processing the request, so would need to find out why it would switch vhost. This could be for some reason the URL is incorrect.

Ok, I looked the vhosts…all have the NC document root at /var/www/nextcloud (same as the initial install). not sure why it was looking it in …/html . but that has not changed anything regarding access. :disappointed:
What else can I try?

(or is it time to “cut bait”, reinstall NC, and point it to the existing data directory?)

if anyone can help me interpret these errors:


:20:27+00:00",“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}
{“reqId”:“AgEUrscSLURKVA7vqBcG”,“remoteAddr”:“127.0.0.1”,“app”:“PHP”,“message”:“filesize(): stat failed for /media/neil/Cloud/burcham/neil/files/30 linux questions.txt at /var/www/nextcloud/lib/private/Files/Storage/Local.php#160”,“level”:3,“time”:“2017-04-24T04:31:37+00:00”,“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}
{“reqId”:“AgEUrscSLURKVA7vqBcG”,“remoteAddr”:“127.0.0.1”,“app”:“PHP”,“message”:“filesize(): stat failed for /media/neil/Cloud/burcham/neil/files/30 linux questions.txt at /var/www/nextcloud/lib/private/Files/Storage/Local.php#211”,“level”:3,“time”:“2017-04-24T04:31:37+00:00”,“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}
{“reqId”:“AgEUrscSLURKVA7vqBcG”,“remoteAddr”:“127.0.0.1”,“app”:“PHP”,“message”:“fopen(/media/neil/Cloud/burcham/neil/files/30 linux questions.txt): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#216”,“level”:3,“time”:“2017-04-24T04:31:37+00:00”,“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}
{“reqId”:“AgEUrscSLURKVA7vqBcG”,“remoteAddr”:“127.0.0.1”,“app”:“PHP”,“message”:“fread() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/lib/private/Files/Storage/Local.php#217”,“level”:3,“time”:“2017-04-24T04:31:37+00:00”,“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}
{“reqId”:“AgEUrscSLURKVA7vqBcG”,“remoteAddr”:“127.0.0.1”,“app”:“PHP”,“message”:“fclose() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218”,“level”:3,“time”:“2017-04-24T04:31:37+00:00”,“method”:“GET”,“url”:"/nextcloud/index.php/apps/files_texteditor/ajax/loadfile?filename=30+linux+questions.txt&dir=%2F",“user”:“neil”,“version”:“11.0.2.7”}


These came from the data directory >external files/nextcloud.log