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

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I am trying to install version 12, I appreciate that nginx.conf was written with version 11 in mind. I tried to make my own, based on your links to the nextcloud site, but my attempts were a failure.
Nothing major has changed from nextcloud 11 to 12 documented nginx config.

You nginx config's main issue is several of the location blocks are missing "~" after the word 'location'. I would check every location block to make sure it matches what you are trying to do.
I believe this bites some users pasting into some terminal programs, though I've never experienced it.

Also, for NC12 you should remove any "add_header X-Frame-Options "SAMEORIGIN"; "
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
have you written an nginx.conf for nextcloud when installed in this situation following your guide for owncloud?

If I could work from that, then I would potentially be in a better position.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
have you written an nginx.conf for nextcloud when installed in this situation following your guide for owncloud?

If I could work from that, then I would potentially be in a better position.
The nginx config on the first page works perfectly well with nextcloud 12. but it's assumption is files are installed in /usr/local/www/owncloud and you use a webroot of /owncloud.
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Ok, four missing ~

Thank you, it is working.

I tried working with the one you posted in the first post, but I couldn't modify it to work :(
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok, four missing ~

Thank you, it is working.

Do you see any need to change the conf beyond what you said above.
Great!

I know some people were having issues with the 403/404 lines, but if you are not I would leave them be.
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
  • Code:
    No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.


    Where did I go wrong in the installation?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
  • Code:
    No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.


    Where did I go wrong in the installation?
I'm not sure if that means 'php70-opcache' was not installed.
Or if you didn't install and enable 'php70-APCu'
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
opcache was installed during initial installation

am i correct in thinking php70-APCu can't be installed using pkg install

do i need apcu to use opcache?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
opcache was installed during initial installation

am i correct in thinking php70-APCu can't be installed using pkg install

do i need apcu to use opcache?
yes, ACPu needs to compiled from ports using...
"make config-recursive install -C /usr/ports/devel/pecl-APCu"

no, opcache should just work if it is installed.
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Are these setting safe to use? on freenas

Code:
The PHP Opcache is not properly configured. For better performance we recommend ↗ to use following settings in the php.ini:
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Code:
The PHP Opcache is not properly configured. For better performance we recommend ↗ to use following settings in the php.ini:
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
someone else had this issue in this thread. can you confirm you have php70-opcache installed?
'pkg info | grep opcache'
 

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Ok, got rid of the opcache message, reloaded the php.ini

now just left with

Code:
  • No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.


do i need apcu to make that go away?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok, got rid of the opcache message, reloaded the php.ini

now just left with

Code:
  • No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.


do i need apcu to make that go away?
either that or redis/memcache.
 

Joshua Parker Ruehlig

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

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The only thing I couldn't figure out was how to use the crontab commands and add the cron job
When you run "crontab -e" by default you are editing with the vi editor. Either figure out how to use vi, or change the default editor.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
After updating FreeNAS 9.10 U2 to U4 my nextcloud gave the error that .occdata file was missing from my /mnt/files directory. I created the file .ocdata and changed the permissions to www:www. After that I could access the nextcloud but trying to open documents give me a server error (unexpected server response 503). I'm not sure why things broke or how to fix it.
 
Top