Pydio conf file for nginx

Hi Fourdee! Thanks for this awesome project!

I wrote a nginx conf file for pydio!

pydio works fine with it in /etc/nignx/sites-dietpi, even webdav and file share link redirection are OK!

So, Please. Apply this file to next dietpi release.

Then, I’ll be happy for my little contribution to this wonderful project.

    
        rewrite ^/pydio/dashboard|^/pydio/settings|^/pydio/welcome|^/ws- /pydio/index.php last;
        
	if ( !-e $request_filename ) {
		# WebDAV Rewrites
		rewrite ^/pydio/shares /pydio/dav.php last;
		# Sync client
		rewrite ^/pydio/api /pydio/rest.php last;
		# External users 
		rewrite ^/pydio/user /pydio/index.php?get_action=user_access_point last;
		# Public shares
		rewrite ^/pydio/data/public/([a-zA-Z0-9_-]+)\.php$ /pydio/data/public/share.php?hash=$1?;
	}
	rewrite ^/pydio/data/public/([a-zA-Z0-9_-]+)--([a-z]+)$ /pydio/data/public/share.php?hash=$1&lang=$2?;
	rewrite ^/pydio/data/public/([a-zA-Z0-9_-]+)$ /pydio/data/public/share.php?hash=$1?;

	# Prevent Clickjacking
	add_header X-Frame-Options "SAMEORIGIN";

	# Only allow these request methods and do not accept DELETE, SEARCH and other methods
	if ( $request_method !~ ^(GET|HEAD|POST|PROPFIND|OPTIONS)$ ) {
		return 444;
	}

	location ~* ^/pydio/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
		deny all;
	}

   # Enables Caching
	location ~* \.(ico|css|js)$ {
		expires 7d;
		add_header Pragma public;
		add_header Cache-Control "public, must-revalidate, proxy-revalidate";
	}

P.S: I modified dietpi-cloudshell script, https://dietpi.com/forum/t/xu4-cloudshell-lcd-with-xorg/261/1 I want you to see the script I wrote and consider apply it as new feature in next build.

Hi studioai,

great work and good suggestion.
Will be nice, to put it on github, if it is no problem for you. => https://github.com/Fourdee/DietPi/issues
Only to prevent it will disappear. Thanks.

cu
k-plan

Hi studioai,

many thanks for creating a github ticket: https://github.com/Fourdee/DietPi/issues/297