Nextcloud version: 22.2.6-apache
Operating system and version: Docker (20.10.14), Ubuntu Server (20.04)
Apache or nginx version: Apache 2.4.53, Nginx Reverse Proxy (not in Docker: 1.18.0)
PHP version: 7.2
The issue you are facing:
When installing NextCloud, I recieve the following error:
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory
I am trying to use a MySQL server which is also hosting my Wordpress sites - this server is running directly on the Ubuntu Server VM. I have created a user, password, and database for nextcloud, and have tried the following hostnames, aswell as the following with :3306 at the end.
127.0.0.1
192.168.0.30 (local IP of MySQL server)
localhost
ubuntu-server (hostname)
I am unable to find logs for NextCloud - they don’t seem to have generated (I’m looking for them using Docker exec) ? So if any of you need them I would love if you can point me in the direction! The log for my reverse proxy which is pulling from a subdomain with a certificate from Cloudflare (also proxied by them) does not show anything useful.
I tried to follow the last few steps of that document and still no luck. I assume Admin > Logging refers to from within the NextCloud UI? For the config.php, I cannot find that in /var/www/html; am I looking in the right place? The apache access and error logs are empty, and there is no nextcloud.log in /var/www/.
To clarify, I have not gotten past clicking install.
I’m only a couple months into using Linux in general, especially over SSH, so it could be a stupid mistake or tiny thing I’m missing. Thank you for trying to help!
The database is not hosted in docker, but on the Ubuntu Server VM itself. My Wordpress sites whch are also on the same VM are able to access it fine, and external access (over the local network) is configured and working.
I don’t believe Docker has a built-in firewall (correct me if I am wrong), and I have temporarily disabled the firewall on the host VM.
I’m unsure what you mean here, do you mean the proxy? I have posted my Nginx config below.