Nextcloud version (eg, 10.0.2): 12.0.1.5
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04 running as guest on Windows 7 host using Oracle VirtualBox
Apache or nginx version (eg, Apache 2.4.25): 2.4.18
PHP version (eg, 5.6): 7.0.22
Is this the first time you’ve seen this error?: Yes
Can you reliably replicate it? (If so, please outline steps): Attempt to open Nextcloud using https:///nextcloud. No screen is received and no browser message displayed. The errors show up in the apache2 error.log
The issue you are facing: Cannot open Nextcloud webserver after enabling SSL in apache2. The webserver was working before I enabled SSL. I’m using NAT with port forwarding to get from host IP 192.168.1.2:5180 to webserver IP 10.0.2.15:80. I noticed the NAT gateway address, 10.0.2.2 is also showing up in the nextcloud log and getting rejected. Not sure if that’s significant. The apache2 error.log is showing two messages that might be related.
AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Aug 15 10:17:10.056861 2017] [:error] [pid 1689] [client 10.0.2.15:50008] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in …
I verified my server.csr uses 10.0.2.15 for the server name.
The output of my Nextcloud log in nextcloud.log
{“reqId”:“qMgL4prZPM5z8evMGfRp”,“level”:2,“time”:“2017-08-11T21:09:53+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“vheJPZbD0e8B2f2N3U4O”,“level”:2,“time”:“2017-08-11T21:09:53+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/js/core/merged-template-prepend.js?v=96e3bdabf3b6437eedce819310ea8bc5-0",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“SsAT8Au0V6v31K00jDm3”,“level”:2,“time”:“2017-08-11T21:11:10+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“A2uBc0ttueHzPjHxIWVX”,“level”:2,“time”:“2017-08-11T21:11:10+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/js/core/merged-template-prepend.js?v=96e3bdabf3b6437eedce819310ea8bc5-0",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“qGKEm29s5UB14s6K20GD”,“level”:2,“time”:“2017-08-11T21:11:11+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/js/core/merged-template-prepend.js?v=96e3bdabf3b6437eedce819310ea8bc5-0",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“0tdH1nsXV1igBGO7jSOu”,“level”:2,“time”:“2017-08-11T21:23:06+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“eRk8lcoTsfgcFAtLQgBL”,“level”:2,“time”:“2017-08-11T21:23:06+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/js/core/merged-template-prepend.js?v=96e3bdabf3b6437eedce819310ea8bc5-0",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“zdhKKa1jL2PL56YxRMcb”,“level”:2,“time”:“2017-08-11T21:31:17+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“sJjVYqibwp4VxtDFyqQW”,“level”:2,“time”:“2017-08-11T21:31:17+00:00”,“remoteAddr”:“10.0.2.2”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/js/core/merged-template-prepend.js?v=96e3bdabf3b6437eedce819310ea8bc5-0",“message”:“Trusted domain error. “10.0.2.2” tried to access using “192.168.1.2:5180” as host.”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}
{“reqId”:“XlmfQFu7YpqRBLzdeErR”,“level”:2,“time”:“2017-08-13T21:38:48+00:00”,“remoteAddr”:“10.0.2.15”,“user”:"–",“app”:“core”,“method”:“POST”,“url”:"/index.php/login",“message”:“Login failed: ‘admin’ (Remote IP: ‘10.0.2.15’)”,“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“kxFYZZVaO8CPtR9pru5p”,“level”:2,“time”:“2017-08-13T21:39:05+00:00”,“remoteAddr”:“10.0.2.15”,“user”:"–",“app”:“core”,“method”:“POST”,“url”:"/index.php/login?user=admin",“message”:“Login failed: ‘admin’ (Remote IP: ‘10.0.2.15’)”,“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
The output of my config.php file in /path/to/nextcloud
: