• Shinra
    Shinra
    2017-06-29

    je ne vais pas pouvoir t'aider plus mais j'ai presque le même soucis. I'installateur se lance correctement mais ensuite il ne trouve plus rien, il semble avoir du mal à mettre la main sur le dossier files. Bon il est vrai que c'est sur une raspbian

    Même soucis chez toi? ou rien de rien?

    0
  • yax@framasphere.org
    yax@framasphere.org
    2017-06-30

    Voici la configuration de mon serveur pour NginX / Nextcloud 11 avec HTTPS (Let's Encrypt) et HTTP/2 activés :

    server {
        listen 80;
        server_name cloud.mydomain.fr;
    
        location /.well-known/acme-challenge/ {
            alias /var/www/acme/;
            try_files $uri =404;
        }
    
    
        location / {
            # enforce https
            return 301 https://$server_name$request_uri;
        }
    }
    
    server {
    
      listen 443 http2 ssl;
      server_name cloud.mydomain.fr;
    
      ssl_trusted_certificate /etc/ssl/acme/mydomain.fr-chain.pem;
      ssl_certificate /etc/ssl/acme/mydomain.fr-fullchain.pem;
      ssl_certificate_key /etc/ssl/acme/private/mydomain.fr-privkey.pem;
    
    
      # Add headers to serve security related headers
      # Before enabling Strict-Transport-Security headers please read into this
      # topic first.
      # add_header Strict-Transport-Security "max-age=15768000;
      # includeSubDomains; preload;";
      add_header X-Content-Type-Options nosniff;
      add_header X-Frame-Options "SAMEORIGIN";
      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;
    
      # Path to the root of your installation
      root /var/www/htdocs/cloud.mydomain.fr;
    
      location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
      }
    
      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 512M;
      fastcgi_buffers 64 4K;
    
      # Disable gzip to avoid the removal of the ETag header
      gzip off;
    
      error_page 403 /core/templates/403.php;
      error_page 404 /core/templates/404.php;
    
      location / {
          rewrite ^ /index.php$request_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_pass unix:/run/php-fpm.sock;
          include fastcgi_params;
          fastcgi_split_path_info ^(.+\.php)(/.*)$;
          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_intercept_errors on;
          #fastcgi_request_buffering off;
      }
    
      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)$ {
          try_files $uri /index.php$uri$is_args$args;
          add_header Cache-Control "public, max-age=7200";
          # Add headers to serve security related headers (It is intended to
          # have those duplicated to the ones above)
          # Before enabling Strict-Transport-Security headers please read into
          # this topic first.
          # add_header Strict-Transport-Security "max-age=15768000;
          #  includeSubDomains; preload;";
          add_header X-Content-Type-Options nosniff;
          add_header X-Frame-Options "SAMEORIGIN";
          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 ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
          try_files $uri /index.php$uri$is_args$args;
          # Optional: Don't log access to other assets
          access_log off;
      }
    
    }
    
    0
  • Djan GICQUEL
    Djan GICQUEL
    2017-06-30

    Même soucis chez toi? ou rien de rien?

    Oui c'est exactement ça. L'install se passe bien mais ensuite 404 lorsqu'il essaie d'accéder à http://192.168.0.101/nextcloud/index.php/apps/files/.
    Je me doute que c'est une histoire de redirection qui ne fonctionne pas.

    0
  • yax@framasphere.org
    yax@framasphere.org
    2017-06-30

    Oh c'est une conf en place depuis des mois qui fonctionne en prod. Est-ce que tu as du https et une redirection comme dans ma conf ?

    0
  • yax@framasphere.org
    yax@framasphere.org
    2017-06-30

    Vérifie les droits de tes fichiers par rapport au user de nginx (www-data ? )

    0
  • Djan GICQUEL
    Djan GICQUEL
    2017-06-30

    Oui j'ai du https mais pas de redirection car le port 80 n'est pas accessible chez moi.
    Les droits sont ok je viens de vérifier.

    0
  • yax@framasphere.org
    yax@framasphere.org
    2017-07-01

    hum ... pas commun. C'est installé sans erreur et le 404 se produit sur l'application Fichiers donc ça se passe après l'écran de connexion. Correct ?

    Est-ce qu'il y a quelque chose de pertinent dans le log applicatif (par défaut nextcloud.log dans le répertoire data) ?

    0
  • Djan GICQUEL
    Djan GICQUEL
    2017-07-10

    Le fichier est vide mais dans les log de nginx j'ai
    "/var/www/html/nextcloud/index.php/nextcloud/index.html" is not found

    Ce qui veut bien dire que les redirection ne fonctionne pas correctement je continue à chercher...

    0