no worries, glad you got it workingThanks Joshua. Sorry for the misunderstanding. Its listening on the right port now
Assuming the zpool of your 1TB is tank, and the zpool on your 4TB is new..Guys I have the OC installed on a 1TB HDD and It's running fine.
I bought a new HDD, now 4TB, and would like to transfer the OC for it.
What is the best way to do this? Snapshot? Or is it better to install from scratch?
In fact this new HD is only for new files and those that already exist on 1TB HDD, the jail is on another HD along with other plugins. So I think I could only change the storage location, right?
Thanks for your help!
welcome, glad you got it configured how you want it.well done on the write up. I used it configure Owncloud but pointing to another mysql instances in another jail ( have other apps using the one DBA) but the steps where clear. A couple issues but nothing major. It did take me a bit because I was trying to access Owncloud at the root of the web server and I couldn't figure out the issue at first then I re-read your instructions and noted it was at URL/owncloud so I just moved it and updated nginx config.
Thank you!
Feb 10 14:42:36 SPVault smbd[39533]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:58488) closed connection to service data Feb 10 14:42:36 SPVault smbd[39535]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:14860) closed connection to service data Feb 10 14:42:36 SPVault smbd[39537]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:20382) closed connection to service data Feb 10 14:42:36 SPVault smbd[39539]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:55669) closed connection to service data Feb 10 14:42:36 SPVault smbd[39541]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:45323) closed connection to service data Feb 10 14:42:36 SPVault smbd[39543]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:43790) closed connection to service data Feb 10 14:42:36 SPVault smbd[39545]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:51078) closed connection to service data Feb 10 14:42:37 SPVault smbd[39548]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:45830) closed connection to service data Feb 10 14:42:37 SPVault smbd[39550]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:10126) closed connection to service data Feb 10 14:42:37 SPVault smbd[39552]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:41825) closed connection to service data Feb 10 14:42:37 SPVault smbd[39554]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:55418) closed connection to service data Feb 10 14:42:37 SPVault smbd[39556]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:35114) closed connection to service data Feb 10 14:42:37 SPVault smbd[39558]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:12815) closed connection to service data Feb 10 14:42:38 SPVault smbd[39560]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:38229) closed connection to service data Feb 10 14:42:38 SPVault smbd[39562]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:24500) closed connection to service data Feb 10 14:42:38 SPVault smbd[39564]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:48505) closed connection to service data Feb 10 14:42:38 SPVault smbd[39566]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:12331) closed connection to service data
I have no idea, don't use SMB. This could probably be better answered in owncloud forum.Joshua, thanks for writing this up!
Owncloud is set up to use smb to connect to the datastore on FreeNAS, so we can use cifs/smb shares in the office and owncloud sync on the road.
It's working really well for me, with one little exception: I have pages of these in FreeNAS's log. Is it just running its initial index, or should I worry about these?
Code:Feb 10 14:42:36 SPVault smbd[39533]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:58488) closed connection to service data Feb 10 14:42:36 SPVault smbd[39535]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:14860) closed connection to service data Feb 10 14:42:36 SPVault smbd[39537]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:20382) closed connection to service data Feb 10 14:42:36 SPVault smbd[39539]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:55669) closed connection to service data Feb 10 14:42:36 SPVault smbd[39541]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:45323) closed connection to service data Feb 10 14:42:36 SPVault smbd[39543]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:43790) closed connection to service data Feb 10 14:42:36 SPVault smbd[39545]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:51078) closed connection to service data Feb 10 14:42:37 SPVault smbd[39548]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:45830) closed connection to service data Feb 10 14:42:37 SPVault smbd[39550]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:10126) closed connection to service data Feb 10 14:42:37 SPVault smbd[39552]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:41825) closed connection to service data Feb 10 14:42:37 SPVault smbd[39554]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:55418) closed connection to service data Feb 10 14:42:37 SPVault smbd[39556]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:35114) closed connection to service data Feb 10 14:42:37 SPVault smbd[39558]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:12815) closed connection to service data Feb 10 14:42:38 SPVault smbd[39560]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:38229) closed connection to service data Feb 10 14:42:38 SPVault smbd[39562]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:24500) closed connection to service data Feb 10 14:42:38 SPVault smbd[39564]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:48505) closed connection to service data Feb 10 14:42:38 SPVault smbd[39566]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsowncloud (ipv4:10.0.10.4:12331) closed connection to service data
2015/02/10 15:36:54 [error] 45820#0: *172 open() "/usr/local/www/mnt/clouddata/acook8103/files//Photo-2014-09-19-10-58-07_0426.JPG" failed (2: No such file or directory), client: 10.101.1.174, server: , request: "GET /owncloud/index.php/apps/files/ajax/download.php?dir=%2F&files=Photo-2014-09-19-10-58-07_0426.JPG HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock", host: "cloud.example.com", referrer: "https://cloud.example.com/owncloud/index.php/apps/files/"
worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile off; keepalive_timeout 65; gzip off; server { root /usr/local/www; location = /robots.txt { allow all; access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ^~ /owncloud { index index.php; try_files $uri $uri/ /owncloud/index.php$is_args$args; client_max_body_size 1024M; location ~ ^/owncloud/(?:\.|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 30d; add_header Cache-Control public; } location ^~ /owncloud/data { internal; alias /mnt/clouddata; } } } }
<?php
$CONFIG = array (
'instanceid' => 'id',
'passwordsalt' => 'salty',
'secret' => 'giberish',
'trusted_domains' =>
array (
0 => '10.101.1.167',
1 => 'cloud.example.com',
),
'datadirectory' => '/mnt/clouddata',
'overwrite.cli.url' => 'http://10.101.1.167/owncloud',
'dbtype' => 'mysql',
'version' => '8.0.0.7',
'dbname' => 'owncloud',
'dbhost' => 'localhost:/tmp/mysql.sock',
'dbtableprefix' => 'oc_',
'dbuser' => 'ocuser',
'dbpassword' => 'ocpass',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'smtp.example.com',
'mail_smtpport' => '25',
'mail_from_address' => 'donotreply',
'mail_domain' => 'example.com',
'overwritewebroot' => '/owncloud',
'forcessl' => true,
'maintenance' => false,
'theme' => '',
"appstoreenabled" => true,
);
yeah it could proxy to anything it can connect to. yes you wouldn't be able to access anything anymore if nginx/the jail crashed. nginx has never crashed (and I've been using it for years, Facebook even uses it for SSL termination). but I have had jails lose their IP address, but only when im changing things.
You would need to setup each program to use a specific webroot, then setup your nginx.conf with a server block similar to the below. If you have owncloud setup like this guide, just add entrys for the other services to other locations (and have it proxy to the respective jail IPs, not 127.0.0.1 which would only work for stuff in the owncloud jail)hey Joshua,
I'm very interested in learning how to reverse proxy. For my setup, I have a few different programs (couchpotato, sonarr, plex, owncloud(SSL), sabnzbd, openvpn) with different IP addresses/ports. Would it be possible to setup the reverse proxy such that I can just use a ddns such as foo.ddns.bar/<program_name> and it'll forward the request to the correct program?
you mentioned you have nginx reverse proxy setup on your NAS. would it be possible to see the relevant parts of your nginx file? thanks.
server { location / { return 301 $scheme://$host/maraschino/; location ^~ /maraschino { proxy_pass http://127.0.0.1:7000; } location ^~ /sabnzbd { proxy_pass http://127.0.0.1:8080; } location ^~ /transmission { proxy_pass http://127.0.0.1:9091; } location ^~ /sickrage { proxy_pass http://127.0.0.1:8081; } location ^~ /couchpotato { proxy_pass http://127.0.0.1:5050; } } }
Glad it worked for you. Do realize upgrading this setup to OC8 (which will be available from Admin > Upgrade in the coming days) won't work because they changed the way x-accel works. Please check the NGINX config, I disabled it for now till this is fixed.I just wanted to say how grateful I am to Joshua for writing this perfect tutorial! It all worked just like a charm from A to Z and I was able to deliver a pretty good service to 5 clients working together on daily basis with 15GB of 30k relatively small files (word, excel, pdf, jpeg etc.) without having any problem at all and by doing so ditching Dropbox services for good. Full sync completes in just under 2 hours which I think is amazingly fast!
My Fail2Ban is set and running after just a minute thanks to the flawless tutorial of Rickle so I could say the only thing missing is securing my connection via SSL and I'm good to go.
Thank you guys for all your effort! I truly appreciate your work!
worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile off; keepalive_timeout 65; gzip off; server { root /usr/local/www; location = /robots.txt { allow all; access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ^~ /owncloud { index index.php; try_files $uri $uri/ /owncloud/index.php$is_args$args; client_max_body_size 512M; location ~ ^/owncloud/(?:\.|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 30d; add_header Cache-Control public; } location ^~ /owncloud/data { internal; alias /mnt/files; } } } }
Where are your files mounted to inside the jail? the usual /mnt/files or somewhere else?I've messed up with the nginx.conf didn't I?
Code:worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile off; keepalive_timeout 65; gzip off; server { root /usr/local/www; location = /robots.txt { allow all; access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ^~ /owncloud { index index.php; try_files $uri $uri/ /owncloud/index.php$is_args$args; client_max_body_size 512M; location ~ ^/owncloud/(?:\.|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 30d; add_header Cache-Control public; } location ^~ /owncloud/data { internal; alias /mnt/files; } } } }
My ownCloud location is at /mnt/zdrive/ownCloud if that matters.
Are you using owncloud 7 or 8?Yes, exactly there. I can browse through the /mnt/files and see all user directories and files