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

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
I got some time away from the forum, so I'm a little bit out of date. :oops:

The tutorial on the first page is updated @Joshua Parker Ruehlig?
Is still the best way of getting the OC or can I go through the plugin?

Thanks
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I got some time away from the forum, so I'm a little bit out of date. :oops:

The tutorial on the first page is updated @Joshua Parker Ruehlig?
Is still the best way of getting the OC or can I go through the plugin?

Thanks
yeah its up to date.
either way works. this method work run a bit smoother because it uses mysql instead of sqlite. but the plugin is definitely usable.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I am building a new FreeNAS Owncloud server and I am using your guide. (Thank You)

apc.enable_cli=1 is not in my php.ini
It seems as though APC has been deprecated
https://en.wikipedia.org/wiki/List_of_PHP_accelerators#Alternative_PHP_Cache_.28APC.29

May I successfully ignore this step and optimize caching in another manner later?
you should add that to the PHP section

APC is depreacheated but we are using APCu uses the same variables.

you can ignore it if you like, but your cron jobs and accessing occ may not work, or will at least work slower.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Hmm..I got the calendar app installed but curl --version still reads the older OpenSSL....not sure what is going on but I'm not going to argue with it for now. Anyway, thanks for all the help!
Just install OpenSSL from the package repository.
Code:
pkg install openssl

Once you have it install you need to simlink to the new version.
Code:
mv /usr/bin/openssl /usr/bin/openssl.old

cd /usr/bin

ln -s /usr/local/bin/openssl


You'll have to compile Nginx from ports with the openssl module for it to use the newer version. Be sure to add the following to /etc/make.conf before you compile it:
Code:
WITH_OPENSSL_PORT=yes
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Just install OpenSSL from the package repository.
Code:
pkg install openssl

Once you have it install you need to simlink to the new version.
Code:
mv /usr/bin/openssl /usr/bin/openssl.old

cd /usr/bin

ln -s /usr/local/bin/openssl


You'll have to compile Nginx from ports with the openssl module for it to use the newer version. Be sure to add the following to /etc/make.conf before you compile it:
Code:
WITH_OPENSSL_PORT=yes
this has nothing to do with nginx openssl version. in fact you could compile nginx without openssl like in my production system.

this is specific to curl I believe. I also don't know why you force replaced /usr/bin/openssl. the point of setting the setting you mention is not look there anyway.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Yes you are correct you could. But he stated that his openssl version reports the older version after installing openssl and I responded on how to update and symlink to the newer version. I just threw in the Nginx part in case he wanted to access from the outside and take advantage of the newer version of opnessl. I should have been more clear of that in my post.

Symlinking to the newer version and then recompiling curl should solve his problem no?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yes you are correct you could. But he stated that his openssl version reports the older version after installing openssl and I responded on how to update and symlink to the newer version. I just threw in the Nginx part in case he wanted to access from the outside and take advantage of the newer version of opnessl. I should have been more clear of that in my post.

Symlinking to the newer version and then recompiling curl should solve his problem no?
ahh, i see on the NGINX part.

as for symlinking, it isn't necessary and might break other jail stuff that relies on a specific system version of openssl. The "WITH_OPENSSL_PORT=yes" part is really all you need to recompile curl with the newer openssl.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi,
I have still the curl 60 error and can't install any app. I will give them another try to solve the problem. I have to put "WITH_OPEN_SSL_PORT=YES" in make.conf. then reinstall openssl and recompile curl. I'm right?
Ok. How I have to recompile curl? And must I do the syslink like called above?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi,
I have still the curl 60 error and can't install any app. I will give them another try to solve the problem. I have to put "WITH_OPEN_SSL_PORT=YES" in make.conf. then reinstall openssl and recompile curl. I'm right?
Ok. How I have to recompile curl? And must I do the syslink like called above?
you don't need to the link step, you don't need to reinstall openssl.
All you need to do is add the setting and recompile curl.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
do you mean this:?

  • Add 'WITH_OPENSSL_PORT=yes' to /etc/make.conf

Code:
service php-fpm stop
pkg delete -f php56 php56-curl curl
pkg upgrade openssl
make config -C /usr/ports/ftp/curl # disable GSSAPI_BASE, enable GSSAPI_NONE
make install clean -C /usr/ports/ftp/php56-curl
service php-fpm start
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
do you mean this:?

  • Add 'WITH_OPENSSL_PORT=yes' to /etc/make.conf

Code:
service php-fpm stop
pkg delete -f php56 php56-curl curl
pkg upgrade openssl
make config -C /usr/ports/ftp/curl # disable GSSAPI_BASE, enable GSSAPI_NONE
make install clean -C /usr/ports/ftp/php56-curl
service php-fpm start
Yup, those are the exact steps needed.

Actually you were right earlier, you may need to update openssl to have 1.0.2b or something like that.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
That's sad. I tried this twice without success. I still got errors when I activate apps. So this would not solve my problem I think :(
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That's sad. I tried this twice without success. I still got errors when I activate apps. So this would not solve my problem I think :(
you can you create the file /usr/local/www/owncloud/test.php with the contents
Code:
<?php
phpinfo();
?>


Then browse to http://jail_IP/owncloud/test.php
Look in the curl section to see what openssl version it was compiled with.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I finally got the memcache error fixed yesterday (i'd got the C and u the wrong way around, doh) but have noticed another error this morning and the cron jobs have stopped running.

Code:
It was not possible to execute the cronjob via CLI.  The following technical errors have appeared:
PHP module GD not installed.  Please ask your server administrator to install the module.


Any ideas?
 

gaszto

Dabbler
Joined
Feb 26, 2014
Messages
16
Yup, those are the exact steps needed.

Actually you were right earlier, you may need to update openssl to have 1.0.2b or something like that.

Joshua,
I've also tried, without any success :( I have StartSSL certificate on my domain. Owncloud is working well trough https, but I got the same error when I tried to enable Documents app.
 

gaszto

Dabbler
Joined
Feb 26, 2014
Messages
16
Joshua,
I've also tried, without any success :( I have StartSSL certificate on my domain. Owncloud is working well trough https, but I got the same error when I tried to enable Documents app.
I've found something. After I pkg upgrade openssl the version of the openssl still:
OpenSSL 0.9.8za-freebsd 5 Jun 2014
built on: date not available
platform: FreeBSD-amd64
options: bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) blowfish(idx)
compiler: cc
OPENSSLDIR: "/etc/ssl"


How can I update openssl to 1.0.2?

I tried pkg delete openssl, but after that openssl version -a still the same.
How can I remove the base openssl?

Thanks
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I've found something. After I pkg upgrade openssl the version of the openssl still:
OpenSSL 0.9.8za-freebsd 5 Jun 2014
built on: date not available
platform: FreeBSD-amd64
options: bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) blowfish(idx)
compiler: cc
OPENSSLDIR: "/etc/ssl"


How can I update openssl to 1.0.2?

I tried pkg delete openssl, but after that openssl version -a still the same.
How can I remove the base openssl?

Thanks
That's because the symlink in /usr/bin is still pointing to the old version of openssl that is uncluded in FreeBSD 9.3
You have to symlink to the new version after you install it or the OS will continue to use the older version of openssl and so will any other software you compile from ports.
Code:
mv /usr/bin/openssl /usr/bin/openssl.old
cd /usr/bin
ln -s /usr/local/bin/openssl

@Joshua Parker Ruehlig you are much smarter at this stuff than I will probably ever be but I don't see how this will break any other programs running in the jail by symlinking to the newer version of openssl. I've got a couple of jails that I have done this with and they are running fine and report the newer version of openssl when queried with
Code:
openssl version
it returns OpenSSL 1.0.2d 9 Jul 2015

Your thoughts?
 
Top