NextCloud Installation Q & A

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hello. Thank you very much for your work! Complete OMV/nginx newbie here.

      I have RaspberryPI+Raspbian+Apache+Owncloud and now I want to setup a RaspberryPI+OMV+nginx+Nextcloud from scratch (different SD card) and I had a problem with step 3.

      ╰─$ sudo nginx -t
      nginx: [emerg] unknown "socket" variable
      nginx: configuration file /etc/nginx/nginx.conf test failed

      I am doing different from you that I am using /var/www/nextcloud (where openmediavault is), could that be the cause? The thing is that I have been modifying files manually trying to install NC until yesterday, that I found this tutorial; so now I am not sure if I have left some garbage somewhere.
    • I'm not familiar with RPI.
      It seem like it doesn't recognize the socket variable in your vhost.
      If your NC installation folder is installed in the OS drive, then change the 'Directory' to 'none' under the server's settings.
      And disable 'Use Root' as Document root.

      Double check, and make sure you create the php-m pool first.

      fastcgi_pass $socket;
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 3 times, last by tinh_x7 ().

    • Hello,

      I have followed the guide completely but failed.
      Can I confirm, this will be the folder structure? Because the unzip will create a folder called nextcloud.
      www/nextcloud/nextcloud
      When I run 192.168.2.4:90/setup-nextcloud.php I got error 404 Not Found nginx/1.6.2.
      This is the NGINX error log: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
      Not sure if this is the cause but I have searched for the "setup-nextcloud.php" file by using the Locate plugin, but it is not found. (I have clicked on Update first.)
      I have triple checked the guide and redo this in VM 2 times.
      I am running OMV 3.0.62.

      Can you please guide me?
      Thank you.
    • Try this: 192.168.2.4:90

      I assuming that's your NC ip & port.

      The web installer method is a little easier, if you have good internet connection.


      Source Code

      1. 4a. cd /media/UUID/www/nextcloud
      2. 4b. wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
      3. 4c. Then, go to your browser & enter : http://local.ip:90/setup-nexcloud.php
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 3 times, last by tinh_x7 ().

    • tinh_x7 wrote:

      Try this: 192.168.2.4:90

      I assuming that's your NC ip & port.

      The web installer method is a little easier, if you have good internet connection.


      Source Code

      1. 4a. cd /media/UUID/www/nextcloud
      2. 4b. wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
      3. 4c. Then, go to your browser & enter : http://local.ip:90/setup-nexcloud.php

      Yes, that is my OMV ip and the port I used.
      I have tried your suggestion earlier when I read the Nextcloud user manual.
      Assuming that my setup is all correct, I have tried all these but failed:
      a)192.168.2.4:90/setup-nextcloud.php (by following this guide by downloading the zip file, but I doubt this is correct since the manual says this is for web installer)
      b)192.168.2.4:90/nextcloud (this is from the manual)
      c)192.168.2.4:90
      d)192.168.2.4:90/index.php
      All of the above gave me error 404
      e)192.168.2.4:90/robots.txt
      This one gave me a text.
      f)downloaded the web installer page and add it to the root /media/uuid/www/nextcloud

      The mysql and nginx I have downloaded from the omv plugin.
      I only have 2 other plugins which are jdownloader and locate.

      Could someone please tell me how do I do a simple nginx test just to confirm that the plugin works?
      Thank you.
    • Hello again,

      I noticed that you have updated the Step 5.
      I would like to report that it works now.
      I could reach the web installation wizard.

      At step 7, after I clicked on the Finish Setup, I can no longer access the site.
      The url somehow changed automatically to https and with error. It says ERR_SSL_PROTOCOL_ERROR
      But in the nginx server configuration, I did not use ssl.
      I tried to access the site with http but no longer accessible. It says ERR_TOO_MANY_REDIRECTS
      I checked mysql database and I can see the nextcloud database has been created automatically.

      What should I do?
      Thank you.

      The post was edited 2 times, last by mastermindsos: continue further step 7 issue add some other information ().

    • mastermindsos wrote:

      At step 7, after I clicked on the Finish Setup, I can no longer access the site.
      The url somehow changed automatically to https and with error. It says ERR_SSL_PROTOCOL_ERROR
      But in the nginx server configuration, I did not use ssl.
      I tried to access the site with http but no longer accessible. It says ERR_TOO_MANY_REDIRECTS
      I checked mysql database and I can see the nextcloud database has been created automatically.
      This is SSL config has conflict.

      Did you enable any the 'default server' option ?
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • tinh_x7 wrote:

      mastermindsos wrote:

      At step 7, after I clicked on the Finish Setup, I can no longer access the site.
      The url somehow changed automatically to https and with error. It says ERR_SSL_PROTOCOL_ERROR
      But in the nginx server configuration, I did not use ssl.
      I tried to access the site with http but no longer accessible. It says ERR_TOO_MANY_REDIRECTS
      I checked mysql database and I can see the nextcloud database has been created automatically.
      This is SSL config has conflict.
      Did you enable any the 'default server' option ?
      I have found out the issue.
      Since I do not use ssl, now I have change the extra option by setting the "fastcgi_param HTTPS off".
      It works fine now.

      Thank you.

      The post was edited 1 time, last by mastermindsos: Found out reason for the issue. ().

    • I have the following error message:FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

      service nginx status
      Display Spoiler


      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: active (running) since Do 2017-02-23 12:25:45 CET; 4min 36s ago
      Process: 4588 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
      Process: 4594 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 4591 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Main PID: 4595 (nginx)
      CPU: 333ms
      CGroup: /system.slice/nginx.service
      ├─4595 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
      ├─4596 nginx: worker process
      ├─4597 nginx: worker process
      ├─4598 nginx: worker process
      └─4599 nginx: worker process


      Feb 23 12:25:45 omv systemd[1]: Starting A high performance web server and a reverse proxy server...
      Feb 23 12:25:45 omv systemd[1]: Started A high performance web server and a reverse proxy server.



      ps waux |grep mysql
      Display Spoiler

      root 2891 0.0 0.0 4336 1640 ? S 12:20 0:00 /bin/sh /usr/bin/mysqld_safe
      mysql 3272 0.0 0.6 484428 47140 ? Sl 12:20 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
      www-data 4370 0.0 0.1 269876 8420 ? S 12:25 0:00 php-fpm: pool openmediavault-mysql
      www-data 4371 0.0 0.1 269876 8424 ? S 12:25 0:00 php-fpm: pool openmediavault-mysql
      root 4956 0.0 0.0 12748 2224 pts/1 S+ 12:31 0:00 grep mysql
    • tinh_x7 wrote:

      I'm not familiar with RPI.
      It seem like it doesn't recognize the socket variable in your vhost.
      If your NC installation folder is installed in the OS drive, then change the 'Directory' to 'none' under the server's settings.
      And disable 'Use Root' as Document root.

      Double check, and make sure you create the php-m pool first.

      fastcgi_pass $socket;
      Thank you very much. I could progress more but at the end I broke the system completely or something... It started giving errors like: "There was an error" [OK] so I nuked the installation to start it all over again. Will retake this when I have time.
    • onotop wrote:

      I have the following error message:FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
      I haven't see this error before.
      Double check your vhost codes.

      If this NC installation folder is in your OS drive, then you may need to add this to your vhost options; change it accordingly to your need:

      Source Code

      1. # Path to the root of your installation
      2. root /var/www/nextcloud/;
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 1 time, last by tinh_x7 ().

    • Users Online 3

      1 Member and 2 Guests