Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud not working with matrix-docker-ansible-deploy and non-root nextcloud_path_prefix #66

Open
KlausHans opened this issue May 27, 2023 · 5 comments

Comments

@KlausHans
Copy link

Hello,
i've configed mash with nextcloud. The playbook finishes without error but if i access the nextcloud url it looks wrong:
grafik
The browser console throws errors, that indicate that assets are not found, e.g.:

GET
https://domain.de/core/css/server.css?v=ba222ded25d957b900c03bef914333cd

	
GET
	https://domain.de/core/css/server.css?v=ba222ded25d957b900c03bef914333cd
Status
404
Not Found
VersionHTTP/2
Übertragen175 B (0 B Größe)
Referrer Policyno-referrer

    	
    content-length
    	19
    content-type
    	text/plain; charset=utf-8
    date
    	Sat, 27 May 2023 11:44:27 GMT
    x-content-type-options
    	nosniff
    X-Firefox-Spdy
    	h2
    	
    Accept
    	text/css,*/*;q=0.1
    Accept-Encoding
    	gzip, deflate, br
    Accept-Language
    	de,en-US;q=0.7,en;q=0.3
    Connection
    	keep-alive
    Cookie
    	oc5w7620bgj3=12b1e895fc534e91251e5eab6cf45ea2
    DNT
    	1
    Host
    	domain.de
    Sec-Fetch-Dest
    	style
    Sec-Fetch-Mode
    	no-cors
    Sec-Fetch-Site
    	same-origin
    Sec-GPC
    	1
    TE
    	trailers
    User-Agent
    	Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

I am wondering why the url is https://domain.de/core/css/server.css... . Shouldn't it be https://domain.de/nextcloud/core/css/server.css...?

My Nextcloud config in vars.yml is

########################################################################
#                                                                      #
# nextcloud                                                            #
#                                                                      #
########################################################################

nextcloud_enabled: true

nextcloud_hostname: domain.de
nextcloud_path_prefix: /nextcloud

# Redis configuration, as described below

########################################################################
#                                                                      #
# /nextcloud                                                           #
#                                                                      #
########################################################################

I've substituted the real domain with "domain" everywhere here.

I use Traefik from the Matrix-Playbook and configured it accodingly in the mash vars:

mash_playbook_reverse_proxy_type: other-traefik-container
mash_playbook_reverse_proxyable_services_additional_network: traefik

Any idea whats wrong?

@KlausHans
Copy link
Author

KlausHans commented May 27, 2023

If i change nextcloud_path_prefix: /nextcloud to nextcloud_path_prefix: / and access it accordingly it works. But that is not what i want.

@KlausHans KlausHans changed the title Nextcloud not working Nextcloud not working with matrix-docker-ansible-deploy and non-root nextcloud_path_prefix May 27, 2023
@KlausHans
Copy link
Author

I came across this: nextcloud/docker#401 (comment)
I wanted to try it, but i am stuck because docker exec --user www-data mash-nextcloud-server php occ maintenance:update:htaccess returns Could not open input file: /var/www/html/occ.
How can i use occ in mash? Close to giving up mash... :(

@spantaleev
Copy link
Member

Try docker exec --user $(id -u mash) mash-nextcloud-server php occ

@KlausHans
Copy link
Author

Thanks, that worked.

I made the changes suggested in the linked issue, changed to nextcloud_path_prefix: /nextcloud again and rerun the Playbook. Now i get an internal server error. just run-tags adjust-nextcloud-config didn't helped. I saw that most of the steps from the linked issue are made here too. Before changing nextcloud_path_prefix: /nextcloud to nextcloud_path_prefix: / i wasn't able to perform just run-tags adjust-nextcloud-config, it threw errors (i think because nextcloud wasn't initialised yet. I couldn't initialise it in the broken state).

@spantaleev
Copy link
Member

From what I remember, you're supposed to do the adjust-config thing only after going through the installation steps via the web UI.

This is also documented here: https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/nextcloud.md#usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants