Do not delete these files with the extension bundle when nginx + apache

webserver_issue

#1

When you try to delete a downloaded or created files with the extension specified in the configuration nginx file - is a frontend, extension (jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|mp4|webm|ogg|ogv|mp3|m4v|m4a|flv) there is an error "error deleting file." or renaming "Could not rename file".
When direct hit on apache testhost.com:81 files are deleted or renamed without problems.
Also in the admin control panel, there is an error
Error PHP Function split () is deprecated at /home/user/data/www/testhost.com/lib/private/legacy/files.php#195

Expected behaviour
The files should be deleted or renamed when using reverse proxy nginx + apache

Actual behaviour
The files are not deleted or renamed with the extension specified in Nginx config

Server configuration
Operating system: Linux
nginx/1.11.3
Apache/2.4.10
Database:
5.6.31-77.0 - Percona Server
PHP version:
PHP 5.6.24-0+deb8u1
ownCloud version:
ownCloud 9.1.0 (stable)
fresh install:
ownCloud 9.1.0 (stable)

index.php/settings/integrity/failed
No errors have been found.

Nginx config

	server {
		server_name testhost.com www.testhost.com;
		location ~ \.flv$ {
			flv;
			root $root_path;
		}
		location ~ \.(mp4|webm|ogg|ogv|mp3|m4v|m4a)$ {
			mp4;
			root $root_path;
		}
		location / {
			proxy_pass http://198.51.100.2:81;
			proxy_redirect http://198.51.100.2:81/ /;
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Forwarded-Proto $scheme;
			proxy_set_header X-Real-IP $remote_addr;
		}
		location @fallback {
			proxy_pass http://198.51.100.2:81;
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Forwarded-Proto $scheme;
			proxy_set_header X-Real-IP $remote_addr;
		}
		location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
			root $root_path;
			access_log /home/nginx-logs/user isp;
			error_page 404 = @fallback;
		}
		include /usr/local/ispmgr/etc/nginx.inc;
		listen 198.51.100.2;
		disable_symlinks if_not_owner from=$root_path;
		set $root_path /home/user/data/www/testhost.com;
	}

Apache config

<Directory /home/user/data/www/testhost.com>
	Options +ExecCGI +Includes
	php_admin_value open_basedir "/home/user/data:."
	php_admin_flag engine on
</Directory>
<VirtualHost 198.51.100.2:81>
	ServerName testhost.com
	AssignUserID user user
	CustomLog /dev/null combined
	DocumentRoot /home/user/data/www/testhost.com
	ErrorLog /home/httpd-logs/testhost.com.error.log
	ServerAdmin webmaster@testhost.com
	ServerAlias www.testhost.com
	RLimitMEM 1073741824
	ScriptAlias /cgi-bin/ /home/user/data/www/testhost.com/cgi-bin/
	AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
	AddType application/x-httpd-php-source .phps
	php_admin_value open_basedir "/home/user/data:."
	php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@testhost.com"
	php_admin_value upload_tmp_dir "/home/user/data/mod-tmp"
	php_admin_value session.save_path "/home/user/data/mod-tmp"
	php_admin_value memory_limit "1073741824"
</VirtualHost>

#2

nginx has some support listed here:

http://nginx.org/en/support.html

where you can get some help with your nginx config


#3

So no problems with the configuration and script do not work on the renaming and deleting when reverse proxy