Created
December 26, 2022 13:55
-
-
Save Kambaa/01bf39ce07d9bd37c7993f7a3c618a9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server_tokens off; | |
include mime.types; | |
default_type application/octet-stream; | |
#sendfile on; | |
keepalive_timeout 35; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
ssl_certificate /etc/ssl/ssl.cert; | |
ssl_certificate_key /etc/ssl/ssl.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
server { | |
listen 80; | |
server_name default_server; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name default_server; | |
add_header Content-Security-Policy "default-src 'self' data:;" always; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} | |
# SEAFILE SETTINGS | |
server { | |
listen 443 ssl; | |
server_name cloud.CHANGEME.com; # change accordingly | |
proxy_set_header X-Forwarded-For $remote_addr; | |
location / { | |
proxy_pass http://seafile; | |
proxy_set_header Host $host:$server_port; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
proxy_connect_timeout 36000s; | |
proxy_read_timeout 36000s; | |
proxy_send_timeout 36000s; | |
send_timeout 36000s; | |
proxy_request_buffering off; # works well with mp4 | |
proxy_buffering off; | |
# used for view/edit office file via Office Online Server | |
client_max_body_size 0; | |
} | |
} | |
### | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment