server { listen 80; server_name 192.168.10.100; rewrite ^/(.*) https://$server_name/$1 permanent; } server { listen 443; ssl on; ssl_certificate /etc/ssl/nginx/seafile_pub.pem; ssl_certificate_key /etc/ssl/nginx/seafile_priv.pem; server_name 192.168.10.100; location / { fastcgi_pass 127.0.0.1:8000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi""_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param HTTPS on; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; access_log /var/log/nginx/seahub.access.log; error_log /var/log/nginx/seahub.error.log; } location /media { root /raspCloud/seafile-server-2.0.1/seahub; } location /seafhttp { rewrite /seafhttp/(.*) /$1 break; proxy_pass https://127.0.0.1:8082; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }