ports:web:nextcloud

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
ports:web:nextcloud [2023/05/20 15:28] – [Configurer] davidports:web:nextcloud [2024/01/16 22:09] (Version actuelle) – [php] zorro
Ligne 18: Ligne 18:
 # pkg -j nextcloud install www/nextcloud databases/pecl-memcache  # pkg -j nextcloud install www/nextcloud databases/pecl-memcache 
 </code> </code>
 +
 +vous pouvez aussi ajouter ''graphics/pecl-imagick'' pour éviter un avertissement sur la génération du favicon, mais il embarque beaucoup de dépendances.\\
 +Construisez avec vos [[jails:zfs#ports|poudrieres]] la version ''nox11'':
 +<file make nextcloud-list>
 +DEFAULT_VERSIONS+= imagemagick=6-nox11
 +</file>
  
 ===== Base de donnée ===== ===== Base de donnée =====
Ligne 45: Ligne 51:
 Après avoir configuré votre nom de domaine et installé des clefs //https//, configurez le serveur web comme suit: Après avoir configuré votre nom de domaine et installé des clefs //https//, configurez le serveur web comme suit:
  
-<file nginx [highlight_lines_extra="2,15,27,30,145"]>+<file nginx [highlight_lines_extra="2,15,27,30,31,32,157"]>
 upstream php-handler { upstream php-handler {
     server unix:/jails/next/var/run/php-fpm.sock;     server unix:/jails/next/var/run/php-fpm.sock;
Ligne 60: Ligne 66:
     listen 80;     listen 80;
     listen [::]:80;     listen [::]:80;
-    server_name cloud.chezmpi.eu;+    server_name cloud.chezmoi.eu;
  
     # Prevent nginx HTTP Server Detection     # Prevent nginx HTTP Server Detection
Ligne 75: Ligne 81:
  
     # Path to the root of your installation     # Path to the root of your installation
-    root /jails/next/usr/local/www/nextcloud;+    set $jail_path "/jails/next"; 
 +    set $www_next  "/usr/local/www/nextcloud"; 
 +    root $jail_path$www_next;
  
     # Use Mozilla's guidelines for SSL/TLS settings     # Use Mozilla's guidelines for SSL/TLS settings
-    # https://mozilla.github.io/server-side-tls/ssl-config-generator/  +    # https://mozilla.github.io/server-side-tls/ssl-config-generator/ 
-    ssl_certificate /usr/local/etc/letsencrypt/live/cloud.dmarec.fr/fullchain.pem+    ssl_certificate     /etc/ssl/nginx/cloud.example.com.crt
-    ssl_certificate_key /usr/local/etc/letsencrypt/live/cloud.dmarec.fr/privkey.pem;+    ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
  
     # Prevent nginx HTTP Server Detection     # Prevent nginx HTTP Server Detection
Ligne 104: Ligne 112:
     gzip_min_length 256;     gzip_min_length 256;
     gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;     gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
-    gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;+    gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
  
     # Pagespeed is not supported by Nextcloud, so if your server is built     # Pagespeed is not supported by Nextcloud, so if your server is built
Ligne 127: Ligne 135:
     # Remove X-Powered-By, which is an information leak     # Remove X-Powered-By, which is an information leak
     fastcgi_hide_header X-Powered-By;     fastcgi_hide_header X-Powered-By;
 +
 +    # Add .mjs as a file extension for javascript
 +    # Either include it in the default mime.types list
 +    # or include you can include that list explicitly and add the file extension
 +    # only for Nextcloud like below:
 +    # include mime.types;
 +    types {
 +        text/javascript js mjs;
 +    }
  
     # Specify how to handle directories -- specifying `/index.php$request_uri`     # Specify how to handle directories -- specifying `/index.php$request_uri`
Ligne 190: Ligne 207:
  
         include fastcgi_params;         include fastcgi_params;
-        fastcgi_param SCRIPT_FILENAME /usr/local/www/nextcloud/$fastcgi_script_name;+#        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
 +        fastcgi_param SCRIPT_FILENAME $www_next/$fastcgi_script_name;
         fastcgi_param PATH_INFO $path_info;         fastcgi_param PATH_INFO $path_info;
         fastcgi_param HTTPS on;         fastcgi_param HTTPS on;
Ligne 204: Ligne 222:
     }     }
  
-    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ {+    # Serve static files 
 +    location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
         try_files $uri /index.php$request_uri;         try_files $uri /index.php$request_uri;
         add_header Cache-Control "public, max-age=15778463, $asset_immutable";         add_header Cache-Control "public, max-age=15778463, $asset_immutable";
Ligne 235: Ligne 254:
 ===== php ===== ===== php =====
  
-Configurez php-fpm comme suit: +Configurez [[ports:web:php#configuration|php-fpm]] comme suit:
 <file diff php-fpm/www.conf> <file diff php-fpm/www.conf>
 --- php-fpm.d/www.conf.default 2023-05-14 02:00:42.000000000 +0000 --- php-fpm.d/www.conf.default 2023-05-14 02:00:42.000000000 +0000
Ligne 298: Ligne 316:
  ; Error handling and logging ;  ; Error handling and logging ;
  
-@@ -700,7 +700,7 @@ 
- ; Its value may be 0 to disable the limit. It is ignored if POST data reading 
- ; is disabled through enable_post_data_reading. 
- ; https://php.net/post-max-size 
--post_max_size = 32M 
-+post_max_size = 1G 
-  
- ; Automatically add files before PHP document. 
- ; https://php.net/auto-prepend-file 
-@@ -852,7 +852,7 @@ 
-  
- ; Maximum allowed size for uploaded files. 
- ; https://php.net/upload-max-filesize 
--upload_max_filesize = 512M 
-+upload_max_filesize = 2G 
-  
- ; Maximum number of files that can be uploaded via a single request 
- max_file_uploads = 20 
 @@ -950,6 +950,7 @@ @@ -950,6 +950,7 @@
  ;extension=pdo_sqlite  ;extension=pdo_sqlite
Ligne 340: Ligne 340:
  ; The amount of memory for interned strings in Mbytes.  ; The amount of memory for interned strings in Mbytes.
 -;opcache.interned_strings_buffer=8 -;opcache.interned_strings_buffer=8
-+opcache.interned_strings_buffer=80++opcache.interned_strings_buffer=8
    
  ; The maximum number of keys (scripts) in the OPcache hash table.  ; The maximum number of keys (scripts) in the OPcache hash table.
Ligne 347: Ligne 347:
 </file> </file>
  
-Créer une entrée pour cron: +Créez une entrée pour cron(8)
- +<code bash [highlight_lines_extra="5,6"]>
-<code bash>+
 crontab -u www -e crontab -u www -e
 crontab -u www -l crontab -u www -l
 SHELL=/bin/sh SHELL=/bin/sh
 PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin  PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin 
 +MAILTO=patron@cloud.lapinbilly.eu
 */5  *  *  *  * /usr/local/bin/php --define apc.enable_cli=1 -f /usr/local/www/nextcloud/cron.php  */5  *  *  *  * /usr/local/bin/php --define apc.enable_cli=1 -f /usr/local/www/nextcloud/cron.php 
 </code> </code>
  
 +La variable ''MAILTO'' va vous permettre de recevoir des messages en cas de problème. Par contre, dans ce cas, vous allez recevoir toutes les cinq minutes. ;-)
 +Si vous voulez éviter ça, choisissez ''MAILTO=""''.
 ===== Configurer ===== ===== Configurer =====
  
  • ports/web/nextcloud.1684596528.txt.gz
  • Dernière modification : 2023/05/20 15:28
  • de david