tech:notes_seafile_nginx_debian
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_seafile_nginx_debian [2025/04/01 14:47] – Jean-Baptiste | tech:notes_seafile_nginx_debian [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes seafile avec Nginx sous Debian | ||
| + | |||
| + | Voir aussi : | ||
| + | * rclone | ||
| + | * directive `sendfile_max_chunk` pour Nginx | ||
| + | |||
| + | Votre navigateur doit envoyer le " | ||
| + | |||
| + | Liens : | ||
| + | * http:// | ||
| + | * http:// | ||
| + | * https:// | ||
| + | |||
| + | ~~~bash | ||
| + | adduser --group --system --disabled-password seafile | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install python-setuptools python-imaging | ||
| + | ~~~ | ||
| + | |||
| + | `/ | ||
| + | ~~~nginx | ||
| + | server { | ||
| + | listen 80; | ||
| + | server_name seafile.acme.fr; | ||
| + | rewrite ^ https:// | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl; | ||
| + | server_name seafile.acme.fr; | ||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | proxy_set_header X-Forwarded-For $remote_addr; | ||
| + | |||
| + | location / { | ||
| + | proxy_bind http:// | ||
| + | # fastcgi_pass | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | } | ||
| + | |||
| + | location /seafhttp { | ||
| + | rewrite ^/ | ||
| + | proxy_pass http:// | ||
| + | # | ||
| + | client_max_body_size 0; | ||
| + | proxy_request_buffering off; | ||
| + | proxy_connect_timeout | ||
| + | proxy_read_timeout | ||
| + | proxy_send_timeout | ||
| + | } | ||
| + | |||
| + | location /media { | ||
| + | root / | ||
| + | } | ||
| + | } | ||
| + | |||
| + | ~~~ | ||
| + | |||
| + | ------ | ||
| + | |||
| + | ## Derrière un reverse proxy Nginx | ||
| + | |||
| + | On NGINX Reverse-proxy Server | ||
| + | |||
| + | `/ | ||
| + | ~~~nginx | ||
| + | server { | ||
| + | listen 80; | ||
| + | server_name files2.acme.fr www.files2.acme.fr; | ||
| + | rewrite ^ https:// | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl; | ||
| + | server_name files2.acme.fr www.files2.acme.fr; | ||
| + | |||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | add_header Strict-Transport-Security " | ||
| + | |||
| + | server_tokens off; | ||
| + | proxy_set_header X-Forwarded-For $remote_addr; | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | client_max_body_size 0; | ||
| + | # | ||
| + | |||
| + | location /seafhttp { | ||
| + | rewrite ^/ | ||
| + | proxy_pass http:// | ||
| + | client_max_body_size 0; | ||
| + | # | ||
| + | proxy_connect_timeout | ||
| + | proxy_read_timeout | ||
| + | proxy_send_timeout | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | location / { | ||
| + | proxy_pass http:// | ||
| + | # fastcgi_pass | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | # fastcgi_param | ||
| + | } | ||
| + | |||
| + | location /media { | ||
| + | #root / | ||
| + | proxy_pass http:// | ||
| + | include / | ||
| + | } | ||
| + | |||
| + | } | ||
| + | ~~~ | ||
| + | |||
| + | On FILE Server | ||
| + | |||
| + | `/ | ||
| + | ~~~nginx | ||
| + | server { | ||
| + | listen 8081; | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | server_tokens off; | ||
| + | |||
| + | location /media { | ||
| + | root / | ||
| + | } | ||
| + | } | ||
| + | ~~~ | ||
| + | |||
| + | `conf/ | ||
| + | ~~~ini | ||
| + | [fileserver] | ||
| + | port=8082 | ||
| + | host=0.0.0.0 | ||
| + | ~~~ | ||
| + | |||
| + | `conf/ | ||
| + | ~~~ini | ||
| + | SERVICE_URL = https:// | ||
| + | ~~~ | ||
| + | |||
| + | `conf/ | ||
| + | ~~~python | ||
| + | FILE_SERVER_ROOT = ' | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | su - www-data -s /bin/bash | ||
| + | ./ | ||
| + | export SEAFILE_FASTCGI_HOST=' | ||
| + | ./seahub.sh start-fastcgi | ||
| + | ~~~ | ||
| + | |||
| + | ------------------------ | ||
| + | |||
| + | ~~~bash | ||
| + | ln -s seafile-server-5.1.1 seafile-server-latest | ||
| + | cd seafile-server-latest | ||
| + | ./ | ||
| + | ~~~ | ||
| + | |||
| + | `~/ | ||
| + | ~~~ini | ||
| + | [General] | ||
| + | SERVICE_URL = https:// | ||
| + | ~~~ | ||
| + | |||
| + | `~/ | ||
| + | ~~~ini | ||
| + | [fileserver] | ||
| + | port=8083 | ||
| + | ~~~ | ||
| + | |||
| + | `~/ | ||
| + | ~~~python | ||
| + | FILE_SERVER_ROOT = ' | ||
| + | |||
| + | EMAIL_USE_TLS = False | ||
| + | EMAIL_HOST = ' | ||
| + | # | ||
| + | # | ||
| + | EMAIL_PORT = 25 | ||
| + | # | ||
| + | DEFAULT_FROM_EMAIL = ' | ||
| + | # | ||
| + | SERVER_EMAIL = ' | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | ./ | ||
| + | ./seahub.sh start-fastcgi 8003 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ## Clients | ||
| + | |||
| + | Liens : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
