NextCloud Installation Q & A
-
- OMV 3.x
- tinh_x7
-
-
I still have the issue with headers:
My Nginx-Vhost looks like this:
Code
Alles anzeigenadd_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; location = /robots.txt { log_not_found off; allow all; access_log off; } # The following 2 rules are only needed for the user_webfinger app. # Uncomment it if you're planning to use this app. #rewrite ^/.well-known/host-meta /public.php?service=host-meta last; #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json # last; location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; } location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; } # set max upload size client_max_body_size 50G; fastcgi_buffers 64 4K; # Disable gzip to avoid the removal of the ETag header gzip off; # Uncomment if your server is build with the ngx_pagespeed module # This module is currently not supported. #pagespeed off; error_page 403 /core/templates/403.php; error_page 404 /core/templates/404.php; location / { rewrite ^ /index.php$uri; } location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS on; #Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; fastcgi_pass $socket; fastcgi_intercept_errors on; } location ~ ^/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block location ~* \.(?:css|js|woff|svg|gif)$ { try_files $uri /index.php$uri$is_args$args; add_header Cache-Control "public, max-age=7200"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; # Optional: Don't log access to assets access_log off; } location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { try_files $uri /index.php$uri$is_args$args; # Optional: Don't log access to other assets access_log off; }
I am a little concerned about security ...Why is the security-check showing this headers as not present when they are activated through configuration?
-
Did you make any other changes in NextCloud?
Is your system using OMV2 or OMV3? -
-
Hello,
I hope you can help me out. I follow this instruction
NextCloud Installation
and stuck at step: 7. open your browser and enter your local ip such as: http://192.168.1.11:90 to begin the installation.the issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.
here is what I have:
openmediavault 3.0.39
openmediavault-nginx 3.0.11
nextcloud 12.0.0 (https://download.nextcloud.com…ases/nextcloud-12.0.0.zip)0) logging & setting
logging:
http://imgur.com/a/S3ISb
(openmediavault nginx bad gateway 502, no such file or directory while connecting to upstream /favicon.ico)setting:
http://imgur.com/a/zdQwq1) First try
error message say
This site can’t be reached
192.168.1.11 refused to connect.
Try:- Checking the connection
- Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
I can access omv webui throught this link (http://192.168.1.11 )
I also temporarily turn off firewall, but same error.2) second try
I then go to webui -> Nginx (websites) -> settings -> general settings -> checked "enabled", retrying the URL get this new error message:
502 Bad Gateway
in file "/etc/nginx/nginx.conf", the first 3 lines are:
user www-data;
worker_processes 4;
pid /run/nginx.pid;I read this post (https://help.nextcloud.com/t/bad-gateway-502-error/2317/4), last response said :
"
I had the same, till I noticed I had forgotten one instruction. At:
vi /etc/nginx/nginx.conf
I had forgotten to change the first line in:
user www-data;
Problem solved
"But I don't know what to change to
btw, I use port 90, and I didn't enable SSL.
3) third try
I remote in through putty, and run "sudo apt-get remove nginx", now I can't get into webUI (port 80), get error403 Forbidden
nginxthen I try sudo apt-get install nginx, then restart box, same 403 error
And I check it's 755:
root@mothership:/var/www# ls -l
total 8
drwxr-xr-x 2 root root 4096 Jun 18 14:12 html
drwxr-xr-x 3 openmediavault-webgui openmediavault-webgui 4096 Jun 22 10:24 openmediavaultSSH ok, shares ok, just webui doesn't work
I also tried:
- service php5-fpm restart
- service nginx restart
3. netstat -tulpen | grep 90
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44217 3171/nginx -g daemo4. netstat -tulpen | grep 90
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44372 3190/nginx -g daemo5. omv-firstaid
-bash: omv-firstaid: command not found6. rm -f /var/cache/openmediavault/*.json
7. reboot multiple times.
4) not sure what to do next
Before I do anything, I want to hear your opinion first.
yesterday I did a backup from webUI using the backup plugin. and I saw this folder in my storage drive
http://imgur.com/a/zwxkFQ1: I am not sure how to restore
Q2: and should I disconnect my storage drive (two wd 8tb red, raid 1) first?
Q3: And after I restore, and plug in the storage drive back, will that automatically format? maybe plug 1st and see if the data is safe, then plug the 2nd one?
Q4: I use a 8GB USB stick for boot. if it's time to re-install OMV on a usb HDD, what step I should take? my main concern is the two storage drive (8TB WD RED), I don't want a mis step wipe out the data.Thank you!
-
updated: the new issue is "SSH ok, network shares ok, just webui doesn't work"
I follow this instruction
NextCloud Installation
and stuck at step: 7. open your browser and enter your local ip such as: http://192.168.1.11:90 to begin the installation.I believe my mistake are
1) install MySQL, Nginx through ssh, then install plugin through webui
2) uninstall Nginxthe issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.
here is what I have:
openmediavault 3.0.39
openmediavault-nginx 3.0.11
nextcloud 12.0.0 (https://download.nextcloud.com…ases/nextcloud-12.0.0.zip)0) logging & setting
logging:
http://imgur.com/a/S3ISb
(openmediavault nginx bad gateway 502, no such file or directory while connecting to upstream /favicon.ico)setting:
http://imgur.com/a/zdQwq1) First try
error message say
This site can’t be reached
192.168.1.11 refused to connect.
Try:- Checking the connection
- Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
I can access omv webui throught this link (http://192.168.1.11 )
I also temporarily turn off firewall, but same error.2) second try
I then go to webui -> Nginx (websites) -> settings -> general settings -> checked "enabled", retrying the URL get this new error message:
502 Bad Gateway
in file "/etc/nginx/nginx.conf", the first 3 lines are:
user www-data;
worker_processes 4;
pid /run/nginx.pid;I read this post (https://help.nextcloud.com/t/bad-gateway-502-error/2317/4), last response said :
"
I had the same, till I noticed I had forgotten one instruction. At:
vi /etc/nginx/nginx.conf
I had forgotten to change the first line in:
user www-data;
Problem solved
"But I don't know what to change to
btw, I use port 90, and I didn't enable SSL.
3) third try
I remote in through putty, and run "sudo apt-get remove nginx", now I can't get into webUI (port 80), get error (http://imgur.com/a/4pou0)then I try sudo apt-get install nginx, then restart box, same error
And I check it's 755:
root@mothership:/var/www# ls -l
total 8
drwxr-xr-x 2 root root 4096 Jun 18 14:12 html
drwxr-xr-x 3 openmediavault-webgui openmediavault-webgui 4096 Jun 22 10:24 openmediavaultSSH ok, shares ok, just webui doesn't work
I also tried:
1.service php5-fpm restart
2.service nginx restart
3. netstat -tulpen | grep 90
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44217 3171/nginx -g daemo4. netstat -tulpen | grep 90
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44372 3190/nginx -g daemo5. omv-firstaid
-bash: omv-firstaid: command not found6. rm -f /var/cache/openmediavault/*.json
7. reboot multiple times.
8. $ dpkg -l| grep openmediavault
rc openmediavault 3.0.80 all Open network attached storagesolution
rc openmediavault-backup 3.6 all backup plugin for OpenMediaVault.
rc openmediavault-flashmemory 3.4.3 all folder2ram plugin for OpenMediaVault
ii openmediavault-keyring 1.0 all GnuPG archive keys of theOpenMediaVault archive
rc openmediavault-mysql 3.0.4 all MySQL plugin for OpenMediaVault.
rc openmediavault-nginx 3.0.11 all Nginx plugin for OpenMediaVault.
rc openmediavault-omvextrasorg 3.4.25 all OMV-Extras.org Package Repositoriesfor OpenMediaVault
rc openmediavault-syncthing 3.10 all Syncthing plugin for OpenMediaVault.4) attempt omv-firstaid, but no luck
I ssh in as 3 account: root, user#1, user#2
case#1) when login ssh as "root" , then run omv-firstaid, I always got the "command not found" error
case#2)when I ssh using 1st user account, there two scenario
2a) "omv-firstaid" generate this error “-dash: 1: omv-firstaid: not found”2b) "sudo omv-firstaid" get this
*We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
Respect the privacy of others. Think before you type. With great power comes great responsibility.[sudo] password for*
However, after I enter password, it show "not in the sudoers file. This incident will be reported."Then I ran this "sudo usermod -aG sudo,adm 1st_account".
After that I repeat "sudo omv-firstaid", and I got the same ""command not found" error.case#3) I then ssh using 2nd account, and I can reproduce exact same behavior as 1st account.
btw, in /usr/sbin, I search for omv*, only this one show up: omv-mkgraph
5) not sure what to do next
Before I do anything, I want to hear your opinion first.
yesterday I did a backup from webUI using the backup plugin. and I saw this folder in my storage drive
http://imgur.com/a/zwxkFMy goal is to restore omv so I can access webui. "isntall nextcloud" will be next time.
Q1: I am not sure how to restore omv
Q2: and should I disconnect my storage drive (two wd 8tb red, raid 1) first?
Q3: And after I restore, and plug in the storage drive back, will that automatically format? maybe plug 1st and see if the data is safe, then plug the 2nd one?
Q4: I use a 8GB USB stick for boot. if it's time to re-install OMV on a usb HDD, what step I should take? my main concern is the two storage drive (8TB WD RED), I don't want a mis step wipe out the data.Thank you for reading
Thank you!
-
Hello,
I hope you can help me to resolve this omv issue during the NextCloud installation.
I intended to write the detailed description here, but the website doesn't allow me to submit, got an error. Please read the detail description in this post:
install NextCloud 12.0.0 on omv 3.0.39, webui doesn't work any more, ssh, network share works fine
Long story short, the issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.
Thank you very much!
-
-
First, ensure that OMV and NextCloud don't use the same port.
Second, Nextcloud permission is www-data:www-data.
Third, turn on php.index under Options in Nginx.Do not change anything in the Nginx confi file if you don't know what you're doing.
I usually make a backup of OMV with Clonezilla before try something major new.1. I don't use OMV backup plugin, so somebody else can answer that.
2. Un-plug all data drives before restore OMV.
3. After restored OMV, turn off the system and re-attach all data drives.
No need to format them.
4. Ensure there are no other web server that use OMV or the intended port for NextCloud.My suggestion is do a fresh NextCloud installation.
If you want to remove Nginx, stop it first, then remove it.
-
Hi tinh_x7,
Thank you for your reply!
is Nginx the web server where both OMV's webUI and Nextcloud use? -
Yes, but they have their own thread.
If you remove it, you may not access to OMV via webgui. -
-
I use a up to date OMV3 (3.0.80) with OMV-Extras.
Changes in Nextcloud ... not a specific, unusual change I can remember.
When setting up Nextcloud, I sticked straight to your howto.
I use the following Plugins: GPXPod, Calendar, Contacts, Notes, Tasks, Versions, and some other standard apps.
-
Hello,
I have a big problem.
Since 1 week, I couldn't send files in Nexctcloud.
I have this on logs:CodeError PHP Class 'OC\L10N\LanguageNotFoundException' not found at /srv/dev-disk-by-label-Local/www/nextcloud/lib/private/L10N/Factory.php#270 2017-07-02T22:41:01+0200 Error PHP include(): Failed opening '/srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/../../../lib/private/L10N/LanguageNotFoundException.php' for inclusion (include_path='/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/console_getopt:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/pear_exception:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/archive_tar:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/srv/dev-disk-by-label-Local/www/nextcloud/apps') at /srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/ClassLoader.php#444 2017-07-02T22:41:01+0200 Error PHP include(/srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/../../../lib/private/L10N/LanguageNotFoundException.php): failed to open stream: Input/output error at /srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/ClassLoader.php#444 2017-07-02T22:41:01+0200
Do you please have an idea :(?
Regards,
-
Maybe it's file permission issues.
Double check it. -
-
Maybe it's file permission issues.
Double check it.
Hello,Thank you for this reply.
I checked:- directory is www-data:ww-data
- root user don't have permissions:
root@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud# ./occ integrity:sign-app
-bash: ./occ: Permission denied - www-data don't have permission:
root@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud# su -s /bin/bash www-data
www-data@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud$ ./occ
bash: ./occ: Permission denied
What is wrong?
Everything worked fine before.Thank you.
Best regards,
-
I don't know if you use ACL in your NC shared folder or not, but look at mine.
-
Hello,
Thank you for your replies :-).
I checked and yes but for me, user is www-data and group is www-data recursively Read + Write + Execute.
Same thing with user permissions.
I tried with owner root and owner www-data and it's doesn't work again.
I tried after reboot and no way :(.Logs:
{"reqId":"bXhexvZxPYjhRf29uwHq","level":3,"time":"2017-07-06T22:25:29+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"include(): Failed opening '\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/L10N\/LanguageNotFoundException.php' for inclusion (include_path='\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/console_getopt:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/pear_exception:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/archive_tar:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/pear-core-minimal\/src:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/apps') at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}
{"reqId":"bXhexvZxPYjhRf29uwHq","level":3,"time":"2017-07-06T22:25:29+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"Class 'OC\\L10N\\LanguageNotFoundException' not found at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/private\/L10N\/Factory.php#270","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}
{"reqId":"2cei9B1aAUWcrlncckV4","level":3,"time":"2017-07-06T22:25:40+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"include(\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/L10N\/LanguageNotFoundException.php failed to open stream: Input\/output error at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}Thank you.
-
-
I refer to the PHP pool:
I set
max children = 5
start server = 2
min spare server = 1
max spare server = 3
max requests = 0memory limit = 128 MB
sometimes I get an error within php-fpm, saying I have to increase max children. Is there a recommendation what to set depending on thread + RAM size? I use a quad with 16 GB of RAM. Is it any good to increase max. memory?
-
The max children size and spare server are depend on your computer RAM and CPU spec.
Example: https://myshell.co.uk/blog/201…cesses-for-php-fpm-nginx/You can increase your max children = 10.
-
I found that post as well, but it states no clear reason why using a specific size. Example:
You have 4 GB RAM -> use 5 children
8 GB -> 10 children
16 GB -> 20 children -
-
Actually the post does state a pretty clear method for determining exactly what you'll require.
In general you could probably allow quite a high number of fpm servers to be spawned, as long as they are reaped quickly enough to keep up with the number of users on the system and the aren't any major issues in the code (php i mean) it shouldn't cause issues on your box. Very conservative fpm pool conf (maybe even the default) can handle a very large number of concurrent requests under nginx. I'm talking 500+/s which you wouldn't be hitting in even a small business environment.
-
Okay, so just leave it like it is .... thabk you
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!