[SOLVED] Pydio Sync Client not working with Pydio

Having issues with your DietPi installation, or, found a bug? Post it here.
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MonZon »

I've updated DietPi to the latest version today and found that it has some fixes for Pydio service. Tried Windows Sync app - still no go :(
User avatar
MichaIng
Site Admin
Posts: 2271
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MichaIng »

Have to test here. Perhaps this is a network issue, non with the server.
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MonZon »

Hmm, but I'm in the same LAN, I can ping and use other services just fine.
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by WarHawk »

What was the solve?
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MonZon »

No solution yet. MichaIng, any updates?
User avatar
MichaIng
Site Admin
Posts: 2271
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MichaIng »

Okay played and tested around:
- The Pydio clients seem to need rewrite engine being enabled: Access to Pydio PHP pages via "domain.org/pydio/whatever" instead of "domain.org/pydio/index.php/whatever"
- Actually on Lighttpd URLs (in browser) by default already show up pretty without /index.php/, even without rewrite module enabled.
- However I recognized that reloading such an URL does NOT work, so the rewrite seems to be just done for server answers, but not for requests.
- I enabled mod_rewrite, but that alone does not change something.
- Check Pydio Lighttpd docs: https://pydio.com/en/docs/kb/system/ins ... a-lighttpd
- No rewrite statement shown, however on Fedora. Only for WebDAV access, which is a different thing, out of usual base URL rewrite.

I'm currently installing Nextcloud to verify that it is the same there, as I always thought nothing is required (besides rewrite module enabled).
... jep on Nextcloud even on output, no rewrite is done. We need to add pretty URLs for Lighttpd.

Ah lol, found open topic about this, totally forgot meanwhile: https://github.com/Fourdee/DietPi/issues/1634

Testing for Pydio...
User avatar
MichaIng
Site Admin
Posts: 2271
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MichaIng »

@MonZon
Okay I figured out how to enable sync client support on Lighttpd:

Code: Select all

lighttpd-enable-mod rewrite
sed -i '/^}$/d' /etc/lighttpd/conf-available/99-dietpi-pydio.conf
echo '
	# Rewrite to pretty URLs, which is required for sync clients
	url.rewrite-if-not-file = ( "^/pydio/([^.]+)/?$" => "/pydio/index.php/$1" )

}' >> /etc/lighttpd/conf-available/99-dietpi-pydio.conf
systemctl restart lighttpd
systemctl restart php7.0-fpm
Would be great if you could test, since with all the features you use, web UI file downloads and such :).
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MonZon »

Thanks for the great news, but:

Code: Select all

root@MZCloud:~# sed -i '/^}$/d' /etc/lighttpd/conf-available/99-dietpi-pydio.conf
sed: can't read /etc/lighttpd/conf-available/99-dietpi-pydio.conf: No such file or directory
root@MZCloud:~# cd /etc/lighttpd/
root@MZCloud:/etc/lighttpd# ls -r *
lighttpd.conf

conf-enabled:
99-dietpi-nextcloud.conf     15-fastcgi-php.conf  10-fastcgi.conf
99-dietpi-dav_redirect.conf  10-rewrite.conf

conf-available:
README                               10-status.conf         10-fastcgi.conf
99-dietpi-nextcloud.conf.dietpi-new  10-ssl.conf            10-expire.conf
99-dietpi-nextcloud.conf             10-ssi.conf            10-evhost.conf
99-dietpi-dav_redirect.conf          10-simple-vhost.conf   10-evasive.conf
90-debian-doc.conf                   10-rrdtool.conf        10-dir-listing.conf
15-fastcgi-php.conf                  10-rewrite.conf        10-cgi.conf
11-extforward.conf                   10-proxy.conf          10-accesslog.conf
10-usertrack.conf                    10-no-www.conf         05-auth.conf
10-userdir.conf                      10-flv-streaming.conf
User avatar
MichaIng
Site Admin
Posts: 2271
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MichaIng »

Ah jep sorry, forgot that we just added this with v6.18.

Okay then do the following:

Code: Select all

echo '$HTTP["url"] =~ "^/pydio($|/)" {
	# Deny access to pydio/data dir
	$HTTP["url"] =~ "^/pydio/data" {
		url.access-deny = ("")
	}

	# Rewrite to pretty URLs, which is required for sync clients
	url.rewrite-if-not-file = ( "^/pydio/([^.]+)/?$" => "/pydio/index.php/$1" )

	# Disable PHP output buffering, recommended by Pydio
	setenv.add-environment += (
		"PHP_ADMIN_VALUE" => "output_buffering=Off",
	)

}' > /etc/lighttpd/conf-available/99-dietpi-pydio.conf
lighttpd-enable-mod dietpi-pydio
systemctl restart lighttpd
This also resolves the warnings on pydio setup about output buffering and data dir access permissions. If you resolved this already somewhere else, you should remove one of the directives.
User avatar
MichaIng
Site Admin
Posts: 2271
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Pydio Sync Client not working with Pydio

Post by MichaIng »

Whoopsie, wrong copy&paste, should be /pydio/ dir, not /nextcloud/ of course. Corrected it above.
Post Reply