this post was submitted on 23 Jan 2025
8 points (83.3% liked)

Selfhosted

41674 readers
640 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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

top 9 comments
sorted by: hot top controversial new old
[–] mhzawadi@lemmy.horwood.cloud 3 points 1 week ago (1 children)

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 1 points 1 week ago (1 children)

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 2 points 1 week ago (1 children)

Can you give a screenshot of the error?

[–] sol6_vi@lemmy.world 1 points 1 week ago (1 children)

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

[–] mhzawadi@lemmy.horwood.cloud 1 points 1 week ago (1 children)

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 1 points 1 week ago (1 children)

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 1 points 1 week ago (1 children)

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 1 points 1 week ago (1 children)

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 2 points 1 week ago

Your very welcome