kd2org / karadav

Lightweight NextCloud compatible WebDAV server
https://fossil.kd2.org/karadav/
GNU Affero General Public License v3.0
155 stars 14 forks source link

owncloud/nextcloud clients doesnt work if installed in sub-directory #53

Closed tecufanujacu closed 8 months ago

tecufanujacu commented 8 months ago

Hello there, I followed the instructions for a clean install with apache vhost for subdirectory, everything works perfectly apart the owncloud/nextcloud clients, when they search for the server they fails and in the apache log I have error 404 for the path me.localhost/dav/status.php. If I reach the path from browser I have "Invalid URL" message.

If I instead install karadav in the webserver root karadav.localhost, the everything works correctly included owncloud/nextclod apps.

It seems that the suggested vhost for installing in a subdirectory doesn't work.

Unfortunatly I can't install it in the root but I have to install it in a subdirectory.

I'm trying to solve this problem from two days with no luck. Can someone help me?

bohwaz commented 8 months ago

I'm not sure if those clients allow for a nextcloud/owncloud install in a subdirectory in the first place? Might be why?

tecufanujacu commented 8 months ago

Ok Yes, those clients allows for a nextcloud/owncloud install in a subdirectory because I also use nextcloud installed in a subdirectory from years.

Anyway this surely is a problem which has nothing to do with the clients.

If I install karadav in the root and from the browser I reach the path mydomain.com/status.php then I receive this answer:

installed   true
maintenance false
needsDbUpgrade  false
version "99.0.0"
versionstring   "99.0.0"
edition ""
productname "NextCloud"
extendedSupport false

If instead I install karadav in the subdirectory and from the browser I reach the path mydomain.com/dav/status.php then I receive Invalid URL" message.

This is the cause of not working ownlocud/nextcloud clients.

bohwaz commented 8 months ago

Try the fix I just committed, and set the WWW_URL constant to the correct path, it should work?

tecufanujacu commented 8 months ago

We are almost there, this commit fix the this problem but breaks Manage My Files.

Now when I reach the path mydomain.com/dav/status.php I corectly have:

installed   true
maintenance false
needsDbUpgrade  false
version "99.0.0"
versionstring   "99.0.0"
edition ""
productname "NextCloud"
extendedSupport false

But now when I reach the path mydomain.com/dav/files/demo/ I have the new message Page not found.

bohwaz commented 8 months ago

Try new commit?

tecufanujacu commented 8 months ago

Now Manage My Files works, but this commit braks again status.php, when I reach the path mydomain.com/dav/status.php I have the message Page not found.