NextCloud Installation Q & A

    • OMV 3.x

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

    • tinh_x7 wrote:

      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/;
      I went to the instructions and installed it to /media/UUID/www/nextcloud
    • This has to do with your upload max size settings.


      Look in the .user.ini file.

      /www/nextcloud/.user.ini

      It looks like this:

      Source Code

      1. upload_max_filesize=50G
      2. post_max_size=50G
      3. memory_limit=512M
      4. mbstring.func_overload=0
      5. always_populate_raw_post_data=-1
      6. default_charset='UTF-8'
      7. output_buffering=0
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • Trusted domains should be fine as I am using for now just internal network.


      PHP Source Code

      1. <?php
      2. $CONFIG = array (
      3. 'instanceid' => '*',
      4. 'passwordsalt' => '*',
      5. 'secret' => '*',
      6. 'trusted_domains' =>
      7. array (
      8. 0 => '192.168.0.192:90',
      9. ),
      10. 'datadirectory' => '/media/8cf9573b-3ed3-4271-8a07-1adcbe91c438/www/nextcloud/data',
      11. 'overwrite.cli.url' => 'https://192.168.0.192:90',
      12. 'dbtype' => 'sqlite3',
      13. 'version' => '11.0.1.2',
      14. 'logtimezone' => 'UTC',
      15. 'installed' => true,
      16. );
      Display All
      In Chrome I have this error:

      The 192.168.0.192 page isn’t working

      192.168.0.192 redirected you too many times.
      ERR_TOO_MANY_REDIRECTS


      In Firefox same ... too many redirects

      And this in Safari:


      I tried several times to install again and again, also OMV I have removed and configured again. I used also more VM and different browsers and port's but error is the same.
    • Look in step 2, ensure the "Default Config" is disabled.
      By the way, you don't need to put in the port # in the config.php.

      Did you add any additional codes to the vhost?
      Clear your browser's histories/cookies, and restart the server.
      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 ().

    • Default Config is disabled. I also have removed the port 90 from config.php and clear the histories and cookies. I also installed a new VM to see from there if is working. Still the same result. I didn't added any additional codes to the vhost.

      I have a default config of OMV installed on a proxmox. After install I made just the updated and installed the extras.

      I have tested also OwnCloud and it was working for OwnCloud.
    • krutojmax wrote:

      If i use my nextcloud app on my s7edge i get "A unknown error occured" ("Ein unbekannter Fehler ist aufgetreten")
      Have you any ideas what I can do to fix this?
      That's a generic error doesn't state the cause.
      Perhaps look in the NC forum.

      @alexpad,

      Do you running another web server beside NC?
      I assuming you aren't using SSL, so turn https off.

      fastcgi_param HTTPS off;


      Try the OwnCloud codes, and let me know if it works for you.

      Display Spoiler
      client_max_body_size 50G; # set max upload size
      fastcgi_buffers 64 4K;

      rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
      rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
      rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

      index index.php;
      error_page 403 /core/templates/403.php;
      error_page 404 /core/templates/404.php;

      location = /robots.txt {
      allow all;
      log_not_found off;
      access_log off;
      }

      location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
      deny all;
      }

      location / {
      # The following 2 rules are only needed with webfinger
      rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

      rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
      rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;

      rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;

      try_files $uri $uri/ index.php;
      }

      location ~ ^(.+?\.php)(/.*)?$ {
      try_files $1 = 404;

      include fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $document_root$1;
      fastcgi_param PATH_INFO $2;
      fastcgi_param HTTPS on;
      fastcgi_pass $socket;
      }

      # Optional: set long EXPIRES header on static assets
      location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
      expires 30d;
      # Optional: Don't log access to assets
      access_log off;
      }
      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 ().

    • @tinh_x7

      NC is the only web server that I am running.

      From your original settings I have changed the setting:
      fastcgi_param HTTPS off;

      after this it started working.

      I also used the OwnCloud codes that you have provided but still the HTTPS need's to be off. So for me it's not working in case that HTTPS redirect is ON.

      Thanks, you made it working.


      Other topic will be, in case that I will have a SSL Certificate and I want to enable HTTP do you think will work if I change back to on?

      But until then I am testing NC with http just, so ... thanks for your help.
    • tinh_x7 wrote:

      That's a generic error doesn't state the cause.
      Perhaps look in the NC forum.
      If I use your settings for nginx-server I get this error message.
      If I use this settings
      Display Spoiler

      Source Code

      1. client_max_body_size 10G; # set max upload size
      2. fastcgi_buffers 64 4K;
      3. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
      4. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
      5. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
      6. index index.php;
      7. error_page 403 /core/templates/403.php;
      8. error_page 404 /core/templates/404.php;
      9. location = /robots.txt {
      10. allow all;
      11. log_not_found off;
      12. access_log off;
      13. }
      14. location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
      15. deny all;
      16. }
      17. location / {
      18. # The following 2 rules are only needed with webfinger
      19. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      20. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
      21. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
      22. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
      23. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
      24. try_files $uri $uri/ index.php;
      25. }
      26. location ~ ^(.+?\.php)(/.*)?$ {
      27. try_files $1 = 404;
      28. include fastcgi_params;
      29. fastcgi_param SCRIPT_FILENAME $document_root$1;
      30. fastcgi_param PATH_INFO $2;
      31. fastcgi_param HTTPS on;
      32. fastcgi_pass $socket;
      33. }
      34. # Optional: set long EXPIRES header on static assets
      35. location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
      36. expires 30d;
      37. # Optional: Don't log access to assets
      38. access_log off;
      39. }
      Display All
      then I can use my nextcloud app on my s7edge
    • @kruto,

      I think this could be a bug on Galaxy S7 edge, are you using the browser or a NC app?
      I don't have this issue on my iPhone.

      FYI: those codes are for OwnCloud.

      alexpad wrote:

      Other topic will be, in case that I will have a SSL Certificate and I want to enable HTTP do you think will work if I change back to on?

      Since you've tried NC and OC codes, and you got the same error, that meant the codes are not culprit.
      I believe your Nginx settings or something else is trigger the loop.




      Ensure that you do not enable any default server option on, and only use ssl is disabled.

      Can you post your server settings (step 1f) ?
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

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

    • Don't know if this help any new users, but I wrote a small script for prerequisite dependencies installation, and download & extract NC zip files.
      I haven't test it yet.

      1. Save the script as 'nc_installation.sh".
      2. Change the nextcloud_path variable accordingly.
      3 Then chmod +x nc_installation.sh
      4. Run the script: ./nc_installation.sh

      Shell-Script

      1. #!/bin/bash
      2. echo "Please backup your system before proceed further."
      3. echo "Please ensure that MySQL, Nginx are installed and running."
      4. read -p "Please enter your NextCloud's path. ie. /var/www " nextcloud_path
      5. echo "Your NextCloud's path is: $nextcloud_path"
      6. echo ""
      7. read -p "Please enter your htuser. ie. www-data " htuser
      8. echo "Your htuser is: $htuser"
      9. echo ""
      10. read -p "Please enter your htgroup. ie. www-data " htgroup
      11. echo "Your htgroup is: $htgroup"
      12. echo ""
      13. read -p "Please enter your NextCloud version. ie. 12.0.3 " nc_version
      14. echo "Your NextCloud version is: $nc_version"
      15. link='https://download.nextcloud.com/server/releases/nextcloud-${nc_version}.zip'
      16. echo "Install PHP5, zip, redis-server, APCu wget packages."
      17. apt-get install php5-curl php5-gd wget redis-server php5-redis zip unzip php5-apcu
      18. echo "Go to NC path"
      19. cd $nextcloud_path
      20. echo "Download NextCloud archived file"
      21. wget $link
      22. echo "Extract NC archived file"
      23. unzip ${nc_version}.zip
      24. echo "Copy NC contents to your NC previously created folder"
      25. copy -r nextcloud/. ${nextcloud_path}/nextcloud
      26. echo "chown nextcloud ownership"
      27. chown -R ${htuser}:${htgroup} ${nextcloud_path}/nextcloud
      28. echo "If you've already setup your NC vhost config, then
      29. you can now open your browser and start NextCloud installation."
      30. echo "i.e. http://192.168.1.10:90"
      31. echo "If not, please go to your OMV webpage, and set it up to proceed further."
      32. echo " You can remove NC archive and its downloaded files once you satisfy with your setup."
      Display All
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

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