Différences
Ci-dessous, les différences entre deux révisions de la page.
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:30] – [php] david | ports:web:nextcloud [2024/06/30 06:48] (Version actuelle) – [Nginx] david | ||
---|---|---|---|
Ligne 18: | Ligne 18: | ||
# pkg -j nextcloud install www/ | # pkg -j nextcloud install www/ | ||
</ | </ | ||
+ | |||
+ | vous pouvez aussi ajouter '' | ||
+ | Construisez avec vos [[jails: | ||
+ | <file make nextcloud-list> | ||
+ | DEFAULT_VERSIONS+= imagemagick=6-nox11 | ||
+ | </ | ||
===== 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=" | + | <file nginx [highlight_lines_extra=" |
upstream php-handler { | upstream php-handler { | ||
server unix:/ | server unix:/ | ||
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 70: | Ligne 76: | ||
server { | server { | ||
- | listen 443 ssl http2; | + | |
- | listen [::]:443 ssl http2; | + | |
+ | listen [::]:443 ssl; | ||
server_name cloud.chezmoi.eu; | server_name cloud.chezmoi.eu; | ||
# Path to the root of your installation | # Path to the root of your installation | ||
- | | + | |
+ | set $www_next | ||
+ | root $jail_path$www_next; | ||
# Use Mozilla' | # Use Mozilla' | ||
- | # https:// | + | # https:// |
- | ssl_certificate | + | ssl_certificate |
- | ssl_certificate_key | + | ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key; |
# Prevent nginx HTTP Server Detection | # Prevent nginx HTTP Server Detection | ||
Ligne 104: | Ligne 113: | ||
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/ | + | gzip_types application/ |
# 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 136: | ||
# Remove X-Powered-By, | # Remove X-Powered-By, | ||
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/ | ||
+ | } | ||
# Specify how to handle directories -- specifying `/ | # Specify how to handle directories -- specifying `/ | ||
Ligne 148: | Ligne 166: | ||
location = /robots.txt { | location = /robots.txt { | ||
- | | + | |
log_not_found off; | log_not_found off; | ||
access_log off; | access_log off; | ||
Ligne 190: | Ligne 208: | ||
include fastcgi_params; | include fastcgi_params; | ||
- | | + | # |
+ | fastcgi_param SCRIPT_FILENAME $www_next/ | ||
fastcgi_param PATH_INFO $path_info; | fastcgi_param PATH_INFO $path_info; | ||
fastcgi_param HTTPS on; | fastcgi_param HTTPS on; | ||
Ligne 204: | Ligne 223: | ||
} | } | ||
- | location ~ \.(?: | + | |
+ | | ||
try_files $uri / | try_files $uri / | ||
add_header Cache-Control " | add_header Cache-Control " | ||
Ligne 235: | Ligne 255: | ||
===== php ===== | ===== php ===== | ||
- | Configurez php-fpm comme suit: | + | Configurez |
<file diff php-fpm/ | <file diff php-fpm/ | ||
--- php-fpm.d/ | --- php-fpm.d/ | ||
Ligne 297: | Ligne 317: | ||
; 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:// | ||
- | -post_max_size = 32M | ||
- | +post_max_size = 1G | ||
- | |||
- | ; Automatically add files before PHP document. | ||
- | ; https:// | ||
- | @@ -852,7 +852,7 @@ | ||
- | |||
- | ; Maximum allowed size for uploaded files. | ||
- | ; https:// | ||
- | -upload_max_filesize = 512M | ||
- | +upload_max_filesize = 2G | ||
- | |||
- | ; Maximum number of files that can be uploaded via a single request | ||
- | | ||
@@ -950,6 +950,7 @@ | @@ -950,6 +950,7 @@ | ||
; | ; | ||
Ligne 339: | Ligne 341: | ||
; The amount of memory for interned strings in Mbytes. | ; The amount of memory for interned strings in Mbytes. | ||
-; | -; | ||
- | +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 349: | ||
Créez une entrée pour cron(8): | Créez une entrée pour cron(8): | ||
- | <code bash [highlight_lines_extra=" | + | <code bash [highlight_lines_extra=" |
crontab -u www -e | crontab -u www -e | ||
crontab -u www -l | crontab -u www -l | ||
SHELL=/ | SHELL=/ | ||
PATH=/ | PATH=/ | ||
+ | MAILTO=patron@cloud.lapinbilly.eu | ||
*/5 * * * * / | */5 * * * * / | ||
</ | </ | ||
+ | La variable '' | ||
+ | Si vous voulez éviter ça, choisissez '' | ||
===== Configurer ===== | ===== Configurer ===== | ||