[SOLVED] Nextcloud can't see config.php in new install directory
from sol6_vi@lemmy.world to selfhosted@lemmy.world on 23 Jan 18:43
https://lemmy.world/post/24639574

Update: Turned out I had like 3 versions of php and 2 versions of postgres all installed in different places and fighting like animals. Cleaned up the mess, fresh install of php and postgres, restored postgres data to the database and bobs your uncle. What a mess.

Thanks to everyone who commented. Your input is always so helpful.


Original Post

Hey everyone, it’s me again. I’m now on NGINX, surprisingly simple, not here with a webserver issue today though, rather a nextcloud specific issue. I removed my last post about migrating from Apache to Caddy after multiple users pointed out security issues with what I was sharing, as well as suggesting caddy would be unable to meet my complex hosting needs. Thank you, if that was you.

During the NGINX setup which has gone shockingly smoothly I moved all of my site root directories from /usr/local/apache2/secure to /var/www/

Everything so far has moved over nicely… that is until nextcloud. It’s showing an “Internal Server Error” when loading up. When I check the logs in nextcloud/data/nextcloud.log it informs me nextcloud can’t find the config.php file and is still looking in the old apache webroot. I have googled relentlessly for about four hours now and everything I find is about people moving data directories which is completely irrelevant. Does anyone know how to get F*%KING nextcloud to realize that config.php is in /var/www/nextcloud/config where it belongs? I’m assuming nextcloud has an internal variable to know where it’s own document root is but I can’t seem to find it.

Thanks for any tips.

Cheers

nextcloud.log <- you can click me

#selfhosted

threaded - newest

mhzawadi@lemmy.horwood.cloud on 23 Jan 18:49 collapse

Did you update the nginx config to point to the new location?

Does the user that runs nginx/PHP have write permissions to the new location?

sol6_vi@lemmy.world on 23 Jan 18:53 collapse

yes nginx loads the page no problem, it’s nextcloud that’s throwing the error which is frustrating because there seems to be no way to tell nextcloud the location of config.php has changed (along with the rest of the root dir)

mhzawadi@lemmy.horwood.cloud on 23 Jan 20:35 collapse

Can you give a screenshot of the error?

sol6_vi@lemmy.world on 23 Jan 20:44 collapse

i included a clickable paste at the end of my post, does that work?

mhzawadi@lemmy.horwood.cloud on 24 Jan 06:26 collapse

I can see the error log file, that has a very odd path in it. How are you running php?

Apache module or fpm?

sol6_vi@lemmy.world on 24 Jan 12:22 collapse

Honestly I don’t even recognize that path. I’m using php8.3-fpm and all of the paths have matched what guides typically suggest so far. Friend often installed things to weird directories manually. I don’t know where nextcloud is drawing it’s path to php or, more importantly, it’s path to config.php. 🤔 I feel like if I can tell it that config.php has moved from /usr/local/apache/secure to /var/www - a lot of stuff will snap into place but that’s where I’m hitting this strange wall.

mhzawadi@lemmy.horwood.cloud on 24 Jan 17:00 collapse

I see, my guess is that the path is in an nginx file somewhere. Could be the fpm config, but unlikely.

Nextcloud will look in the root of the nextcloud install for config/config.php

So unless you have been hacking the code, I think it’s nginx config

sol6_vi@lemmy.world on 24 Jan 19:19 collapse

Turned out I had like 3 versions of php and 2 versions of postgres all installed in different places and fighting like animals. Cleaned up the mess, fresh install of php and postgres, restored postgres data to the database and bobs your uncle. What a mess.

Thank you for taking the time to help me. Got me focused on the right thing.

mhzawadi@lemmy.horwood.cloud on 24 Jan 19:28 collapse

Your very welcome