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

Matt The Horwood
link
fedilink
English
117h

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

Apache module or fpm?

Sol 6 VI StatCmd
creator
link
fedilink
English
111h

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.

Matt The Horwood
link
fedilink
English
16h

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

Sol 6 VI StatCmd
creator
link
fedilink
English
14h

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.

Matt The Horwood
link
fedilink
English
24h

Your very welcome

Create a post

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!

  • 1 user online
  • 151 users / day
  • 419 users / week
  • 1.39K users / month
  • 3.83K users / 6 months
  • 1 subscriber
  • 4.03K Posts
  • 82.7K Comments
  • Modlog