[How-To] ownCloud using NGINX, PHP-FPM, and MySQL

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Guys I updated the OC by the first page post and now I'm getting this warning when trying to access inside (http://ip/owncloud) my network and outside of it as well (http://mydomain.com/owncloud):

Code:
<!DOCTYPE html>
<!--[if lte IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="pt_BR" ><![endif]-->
<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="pt_BR" ><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class="ng-csp" data-placeholder-focus="false" lang="pt_BR" ><!--<![endif]-->
    <head data-requesttoken="">
        <meta charset="utf-8">
        <title>
        ownCloud        </title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="referrer" content="never">
        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
        <meta name="apple-itunes-app" content="app-id=543672169">
        <meta name="theme-color" content="#1d2d44">
        <link rel="shortcut icon" href="Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?


Could someone guide me in the mistake I made?

Thank you
probably not something you did incorrectly. the php7.0 APCu port had just been somewhat complicated to install.
either try 'pkg install php70-APCu'
or delete the line enabling APCu caching in owncloud's config/config.php
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
Thanks for the help Joshua.

Erasing both lines

Code:
'memcache.local' => '\\OC\\Memcache\\APCu' 
'memcache.locking' => '\\OC\\Memcache\\Redis'


allow me to access OC again, using (https: // jail_ip / owncloud) but I can not I view my files.

It is as if it had never existed the path '/mnt/files' indexed.

Adding only the first command line back in config.php (memcache.local) returns the same problem from the previous post, but if add only the last line (memcache.locking), I have access but I have no files.

What does is set up wrong?

FYI: php70-APCu and mariadb101-server packages accuse the same warning:
Code:
No packages available to install matching have been found in the repositories


Thank you again !
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks for the help Joshua.

Erasing both lines

Code:
'memcache.local' => '\\OC\\Memcache\\APCu'
'memcache.locking' => '\\OC\\Memcache\\Redis'


allow me to access OC again, using (https: // jail_ip / owncloud) but I can not I view my files.

It is as if it had never existed the path '/mnt/files' indexed.

Adding only the first command line back in config.php (memcache.local) returns the same problem from the previous post, but if add only the last line (memcache.locking), I have access but I have no files.

What does is set up wrong?

FYI: php70-APCu and mariadb101-server packages accuse the same warning:
Code:
No packages available to install matching have been found in the repositories


Thank you again !
you could build php70-APCu from ports, the package is pretty new any they probably haven't got it building properly yet on the FreeBSD package server.
Or, the easier route is to just remove those lines from config.php like you did.

Regarding your files not showing. Where they showing before? Is this an upgrade or a fresh install?
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
This is an upgrade.

I always have used these steps:

Code:
mv /usr/local/www/owncloud /usr/local/www/owncloud-bak
fetch "http://download.owncloud.org/community/owncloud-9.0.4.tar.bz2"
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
rm owncloud-*.tar.bz2
cp /usr/local/www/owncloud-bak/config/config.php /usr/local/www/owncloud/config
chown -R www:www /usr/local/www/owncloud
chsh -s /bin/sh www
su www
php /usr/local/www/owncloud/occ upgrade


And since the installation always follow the recommendations as in the first post.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
This is an upgrade.

I always have used these steps:

Code:
mv /usr/local/www/owncloud /usr/local/www/owncloud-bak
fetch "http://download.owncloud.org/community/owncloud-9.0.4.tar.bz2"
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
rm owncloud-*.tar.bz2
cp /usr/local/www/owncloud-bak/config/config.php /usr/local/www/owncloud/config
chown -R www:www /usr/local/www/owncloud
chsh -s /bin/sh www
su www
php /usr/local/www/owncloud/occ upgrade


And since the installation always follow the recommendations as in the first post.
I'm not sure why it doesn't see your files then. You could try running a scan with occ
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
And how I can do this Joshua? Could you leading me in this?

Thanks
search for ownclouds 'occ' documentation. I don't know off the top of my head the flags
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
Well... as I'm not getting success, I decided to backup the files, delete the Jail and start all over again.

On the MySQL configuration it asks for a password. I already tried 'ocpass' and others more but he will not let me proceed

I am stuck in this part:
Code:
 
mysql_secure_installation
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


How can I work around this?
Thx
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Well... as I'm not getting success, I decided to backup the files, delete the Jail and start all over again.

On the MySQL configuration it asks for a password. I already tried 'ocpass' and others more but he will not let me proceed

I am stuck in this part:
Code:
mysql_secure_installation
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


How can I work around this?
Thx
are you sure you started mysql
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
I be able to do OC runs. Thanks for the help Joshua!

What was missing for me was read a few pages back to realize that other people had the same problem as me and how they were resolved!!

It turns out that I'm not getting to the OC work in https... only http.

I have followed the Cyber tips on page 3 but still no success.

Has changed the how to implement the https?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I be able to do OC runs. Thanks for the help Joshua!

What was missing for me was read a few pages back to realize that other people had the same problem as me and how they were resolved!!

It turns out that I'm not getting to the OC work in https... only http.

I have followed the Cyber tips on page 3 but still no success.

Has changed the how to implement the https?
I don't know, I don't use HTTPS with nginx. I proxy it upstream with HAProxy
 

Zofoor

Patron
Joined
Aug 16, 2016
Messages
219
I had followed this how-to to install nextcloud (they are basically the same), and had troubles with the APCu caching.
So I have changed the config.php file in that way:
Code:
  'memcache.locking' => '\OC\Memcache\Redis',
  'memcache.local' => '\OC\Memcache\Redis',
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,

  ),


and works correctly using Redis for local cache instead of APCu.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I had followed this how-to to install nextcloud (they are basically the same), and had troubles with the APCu caching.
So I have changed the config.php file in that way:
Code:
  'memcache.locking' => '\OC\Memcache\Redis',
  'memcache.local' => '\OC\Memcache\Redis',
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,

  ),


and works correctly using Redis for local cache instead of APCu.
@Zofoor would you mind posting the entire contents of your config.php? Minus your database password of course.
 

Zofoor

Patron
Joined
Aug 16, 2016
Messages
219
@Zofoor would you mind posting the entire contents of your config.php? Minus your database password of course.

Here you are
Code:
<?php
$CONFIG = array (
  'instanceid' => '*redacted*',
  'passwordsalt' => '*redacted*',
  'secret' => '*redacted*',
  'trusted_domains' =>
  array (
    0 => '192.168.1.216',
    1 => '*redacted*',
  ),
  'datadirectory' => '/mnt/files',
  'overwrite.cli.url' => 'http://192.168.1.216/nextcloud',
  'dbtype' => 'mysql',
  'version' => '9.1.0.16',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '*redacted*',
  'dbpassword' => '*redacted*',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '*redacted*',
  'mail_smtpport' => '587',
  'mail_from_address' => 'info',
  'mail_domain' => '*redacted*',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '*redacted*',
  'mail_smtppassword' => '*redacted*',
  'asset-pipeline.enabled' => true,
//  'filelocking.enabled' => true,
  'memcache.distributed' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'memcache.local' => '\OC\Memcache\Redis',
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,

  ),
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MarkDown',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\Illustrator',
    9 => 'OC\\Preview\\Movie',
    10 => 'OC\\Preview\\MSOffice2003',
    11 => 'OC\\Preview\\MSOffice2007',
    12 => 'OC\\Preview\\MSOfficeDoc',
    13 => 'OC\\Preview\\OpenDocument',
    14 => 'OC\\Preview\\PDF',
    15 => 'OC\\Preview\\Photoshop',
    16 => 'OC\\Preview\\Postscript',
    17 => 'OC\\Preview\\StarOffice',
    18 => 'OC\\Preview\\SVG',
    19 => 'OC\\Preview\\TIFF',
    20 => 'OC\\Preview\\Font',
  ),
);

 

nathank1989

Contributor
Joined
Aug 29, 2016
Messages
103
Great guide, however I am stuck on starting MySQL:
Getting this error
Code:
160915 18:37:58 mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended                                             
160915 18:46:24 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql                                           
2016-09-15 18:46:24 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.17-MariaDB) starting as process 18059 ...         
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Using mutexes to ref count buffer pool pages                                     
2016-09-15 18:46:24 34426872832 [Note] InnoDB: The InnoDB memory heap is disabled                                               
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins                                     
2016-09-15 18:46:24 34426872832 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier                   
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Compressed tables use zlib 1.2.8                                                 
2016-09-15 18:46:24 34426872832 [ERROR] InnoDB: Unrecognized value O_DIRECT skip-innodb_doublewrite for innodb_flush_method     
2016-09-15 18:46:24 34426872832 [ERROR] Plugin 'InnoDB' init function returned error.                                           
2016-09-15 18:46:24 34426872832 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.                               
2016-09-15 18:46:24 34426872832 [Note] Plugin 'FEEDBACK' is disabled.                                                           
2016-09-15 18:46:24 34426872832 [ERROR] Unknown/unsupported storage engine: InnoDB                                             
2016-09-15 18:46:24 34426872832 [ERROR] Aborting                                                                               
                                                                                                                               
160915 18:46:24 mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended   


Can't seem to figure out what is wrong....

FreeNas 9.10.1-STABLE, standard jail template from 9.10.1 install.


Can I use mysql56-server instead?
 
Last edited:

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
I am trying to set up a new box. I get this error:

root@owncloudwp:/ # pkg install nginx mariadb101-server redis php70-bz2 php70-ct
ype php70-curl php70-dom php70-exif php70-fileinfo php70-filter php70-gd php70-h
ash php70-iconv php70-intl php70-json php70-mbstring php70-mcrypt php70-pdo_mysq
l php70-openssl php70-posix php70-session php70-simplexml php70-xml php70-xmlrea
der php70-xmlwriter php70-xsl php70-wddx php70-zip php70-zlib php70-APCu php70-r
edis
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'mariadb101-server' have been fou
nd in the repositories

Suggestions as to what I am doing wrong? Thanks
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Change it to mariadb100-server
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Great guide, however I am stuck on starting MySQL:
Getting this error
Code:
160915 18:37:58 mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended                                            
160915 18:46:24 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql                                          
2016-09-15 18:46:24 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.17-MariaDB) starting as process 18059 ...        
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Using mutexes to ref count buffer pool pages                                    
2016-09-15 18:46:24 34426872832 [Note] InnoDB: The InnoDB memory heap is disabled                                              
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins                                    
2016-09-15 18:46:24 34426872832 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier                  
2016-09-15 18:46:24 34426872832 [Note] InnoDB: Compressed tables use zlib 1.2.8                                                
2016-09-15 18:46:24 34426872832 [ERROR] InnoDB: Unrecognized value O_DIRECT skip-innodb_doublewrite for innodb_flush_method    
2016-09-15 18:46:24 34426872832 [ERROR] Plugin 'InnoDB' init function returned error.                                          
2016-09-15 18:46:24 34426872832 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.                              
2016-09-15 18:46:24 34426872832 [Note] Plugin 'FEEDBACK' is disabled.                                                          
2016-09-15 18:46:24 34426872832 [ERROR] Unknown/unsupported storage engine: InnoDB                                            
2016-09-15 18:46:24 34426872832 [ERROR] Aborting                                                                              
                                                                                                                              
160915 18:46:24 mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended   


Can't seem to figure out what is wrong....

FreeNas 9.10.1-STABLE, standard jail template from 9.10.1 install.


Can I use mysql56-server instead?
It sounds like your my.cnf config is wrong. You have "O_DIRECT" and ""skip-innodb_doublewrite" on the same line.

Yeah, you can use any mysql/mariadb/percona database you like.
 

Mad_noob

Dabbler
Joined
Jan 13, 2016
Messages
13
Hi Joshua,

I don't know if you remember my problem with SSL and reverse proxy...

I finally get the reverse proxy working but not with ssl for now.

Here is the reverse proxy jail's nginx's conf :

Code:
worker_processes  2;

error_log  /var/log/nginx-error.log;
pid		/var/run/nginx.pid;

events {
	worker_connections  1024;
}

http {
	include /usr/local/etc/nginx/mime.types;
	default_type application/octet-stream;
	access_log /var/log/nginx-access.log;
	server_names_hash_bucket_size 64;
	sendfile on;
	tcp_nopush on;
	#keepalive_timeout 0;
	keepalive_timeout 65;
	tcp_nodelay on;
	gzip on;
	gzip_comp_level 5;
	gzip_http_version 1.0;
	gzip_min_length 0;
	gzip_types text/plain text/css image/x-icon application/x-javascript;
	gzip_vary on;
 
	proxy_redirect off;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	client_max_body_size 10m;
	client_body_buffer_size 128k;
	client_header_buffer_size 64k;
	proxy_connect_timeout 90;
	proxy_send_timeout 90;
	proxy_read_timeout 90;
	proxy_buffer_size 16k;
	proxy_buffers 32 16k;
	proxy_busy_buffers_size 64k;
 
	upstream freenas-upstream {
		server 192.168.1.3;
		}

	server {
		listen 80;
		server_name yyy.zzz;
		location / {
			proxy_pass http://freenas-upstream;
		}
	}

	upstream plex-upstream {
		server plex.tv;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://plex-upstream;
		}
	}

	upstream owncloud-upstream {
		server 192.168.1.6;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://owncloud-upstream;
		}
	}

	upstream seedbox-upstream {
		server 192.168.1.9;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://seedbox-upstream;
		}
	}
}


Where xxx.yyy.zzz is your domain and subdomains

Here is nginx's Owncloud conf file for the Owncloud jails :

Code:
worker_processes 2;

events {
	worker_connections  1024;
}

http {
	include mime.types;
	default_type application/octet-stream;
	log_format main '$remote_addr - $remote_user [$time_local] "$request" '
	access_log logs/access.log main;
	sendfile off;
	#keepalive_timeout 0;
	keepalive_timeout 65;
	gzip off;

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		root /usr/local/www/owncloud;
		add_header X-Frame-Options "SAMEORIGIN";

		error_page 403 = /core/templates/403.php;
		error_page 404 = /core/templates/404.php;

		rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
		rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
		rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

		location = /robots.txt { allow all; access_log off; log_not_found off; }
		location = /favicon.ico { access_log off; log_not_found off; }

		location ^~ / {
			index index.php;
			try_files $uri $uri/ /index.php?$args;
			client_max_body_size 220M;

			location ~ ^/(?:\.|data|config|db_structure\.xml|README) {
				deny all;
			}

			location ~ \.php(?:$|/) {
				fastcgi_split_path_info ^(.+\.php)(/.+)$;
				fastcgi_pass unix:/var/run/php-fpm.sock;
				fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
				fastcgi_param PATH_INFO $fastcgi_path_info;
				include fastcgi_params;
				fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
			}

			location ~* \.(?:jpg|gif|ico|png|css|js|svg)$ {
				expires max; add_header Cache-Control public;
			}

			location ^~ /data {
				internal;
				alias /mnt/Stockage/Files;
			}
		}
	}
}


It works great, appart of a random error i've when i log into Owncloud's web interface which tells me Webdav interface is not well configured or broken...

I'm still wonder to know how to configure Owncloud's jail or just my reverse proxy to serve https connections to the webservices behind it ?

Any good ideas are welcome :)

EDIT : I'll launch a bunch a test against owncloud with litmus to try to find out what's misconfigured...
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua,

I don't know if you remember my problem with SSL and reverse proxy...

I finally get the reverse proxy working but not with ssl for now.

Here is the reverse proxy jail's nginx's conf :

Code:
worker_processes  2;

error_log  /var/log/nginx-error.log;
pid		/var/run/nginx.pid;

events {
	worker_connections  1024;
}

http {
	include /usr/local/etc/nginx/mime.types;
	default_type application/octet-stream;
	access_log /var/log/nginx-access.log;
	server_names_hash_bucket_size 64;
	sendfile on;
	tcp_nopush on;
	#keepalive_timeout 0;
	keepalive_timeout 65;
	tcp_nodelay on;
	gzip on;
	gzip_comp_level 5;
	gzip_http_version 1.0;
	gzip_min_length 0;
	gzip_types text/plain text/css image/x-icon application/x-javascript;
	gzip_vary on;

	proxy_redirect off;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	client_max_body_size 10m;
	client_body_buffer_size 128k;
	client_header_buffer_size 64k;
	proxy_connect_timeout 90;
	proxy_send_timeout 90;
	proxy_read_timeout 90;
	proxy_buffer_size 16k;
	proxy_buffers 32 16k;
	proxy_busy_buffers_size 64k;

	upstream freenas-upstream {
		server 192.168.1.3;
		}

	server {
		listen 80;
		server_name yyy.zzz;
		location / {
			proxy_pass http://freenas-upstream;
		}
	}

	upstream plex-upstream {
		server plex.tv;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://plex-upstream;
		}
	}

	upstream owncloud-upstream {
		server 192.168.1.6;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://owncloud-upstream;
		}
	}

	upstream seedbox-upstream {
		server 192.168.1.9;
		}

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		location / {
			proxy_pass http://seedbox-upstream;
		}
	}
}


Where xxx.yyy.zzz is your domain and subdomains

Here is nginx's Owncloud conf file for the Owncloud jails :

Code:
worker_processes 2;

events {
	worker_connections  1024;
}

http {
	include mime.types;
	default_type application/octet-stream;
	log_format main '$remote_addr - $remote_user [$time_local] "$request" '
	access_log logs/access.log main;
	sendfile off;
	#keepalive_timeout 0;
	keepalive_timeout 65;
	gzip off;

	server {
		listen 80;
		server_name xxx.yyy.zzz;
		root /usr/local/www/owncloud;
		add_header X-Frame-Options "SAMEORIGIN";

		error_page 403 = /core/templates/403.php;
		error_page 404 = /core/templates/404.php;

		rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
		rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
		rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

		location = /robots.txt { allow all; access_log off; log_not_found off; }
		location = /favicon.ico { access_log off; log_not_found off; }

		location ^~ / {
			index index.php;
			try_files $uri $uri/ /index.php?$args;
			client_max_body_size 220M;

			location ~ ^/(?:\.|data|config|db_structure\.xml|README) {
				deny all;
			}

			location ~ \.php(?:$|/) {
				fastcgi_split_path_info ^(.+\.php)(/.+)$;
				fastcgi_pass unix:/var/run/php-fpm.sock;
				fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
				fastcgi_param PATH_INFO $fastcgi_path_info;
				include fastcgi_params;
				fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
			}

			location ~* \.(?:jpg|gif|ico|png|css|js|svg)$ {
				expires max; add_header Cache-Control public;
			}

			location ^~ /data {
				internal;
				alias /mnt/Stockage/Files;
			}
		}
	}
}


It works great, appart of a random error i've when i log into Owncloud's web interface which tells me Webdav interface is not well configured or broken...

I'm still wonder to know how to configure Owncloud's jail or just my reverse proxy to serve https connections to the webservices behind it ?

Any good ideas are welcome :)

EDIT : I'll launch a bunch a test against owncloud with litmus to try to find out what's misconfigured...
Your owncloud config looks like it is for owncloud <9 and needs to be changed for everything to work properly.

The necessary config changed dramatically with the ownCloud 9 (I wrote it =P )
See here https://doc.owncloud.org/server/9.1...on/nginx_examples.html#example-configurations
Notice the lack of a try_files in the main location block, and how the PHP block only serves specific PHP files. Also you can remove the "/data" block, that feature is no longer supported.
 
Top