This commit is contained in:
118
nginx.conf
118
nginx.conf
@@ -2,76 +2,82 @@ events {
|
||||
worker_connections 12;
|
||||
}
|
||||
|
||||
pid /opt/seafile/pids/nginx.pid;
|
||||
http{
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
upstream hub {
|
||||
server 127.0.0.1:8000;
|
||||
keepalive 2;
|
||||
}
|
||||
|
||||
error_log syslog:server=unix:/dev/log;
|
||||
access_log syslog:server=unix:/dev/log;
|
||||
upstream files {
|
||||
server 127.0.0.1:8082;
|
||||
keepalive 4;
|
||||
}
|
||||
|
||||
upstream hub {
|
||||
server 127.0.0.1:8000;
|
||||
keepalive 2;
|
||||
}
|
||||
upstream webdav {
|
||||
server 127.0.0.1:8080;
|
||||
keepalive 2;
|
||||
}
|
||||
|
||||
upstream files {
|
||||
server 127.0.0.1:8082;
|
||||
keepalive 4;
|
||||
}
|
||||
disable_symlinks off;
|
||||
|
||||
upstream webdav {
|
||||
server 127.0.0.1:8080;
|
||||
keepalive 2;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
error_log syslog:server=unix:/dev/log;
|
||||
access_log syslog:server=unix:/dev/log;
|
||||
|
||||
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
location / {
|
||||
proxy_pass http://hub;
|
||||
proxy_set_header Host $host;
|
||||
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_read_timeout 1200s;
|
||||
|
||||
# used for view/edit office file via Office Online Server
|
||||
client_max_body_size 0;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://hub;
|
||||
proxy_set_header Host $host;
|
||||
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_read_timeout 1200s;
|
||||
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://files;
|
||||
client_max_body_size 0;
|
||||
proxy_connect_timeout 3s;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
}
|
||||
# used for view/edit office file via Office Online Server
|
||||
client_max_body_size 0;
|
||||
|
||||
location /seafdav {
|
||||
fastcgi_pass webdav;
|
||||
fastcgi_keep_conn on;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_script_name;
|
||||
}
|
||||
|
||||
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;
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://files;
|
||||
proxy_http_version 1.1;
|
||||
client_max_body_size 0;
|
||||
proxy_connect_timeout 3s;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
}
|
||||
|
||||
client_max_body_size 0;
|
||||
location /seafdav {
|
||||
fastcgi_pass webdav;
|
||||
fastcgi_keep_conn on;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_script_name;
|
||||
|
||||
}
|
||||
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;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
}
|
||||
|
||||
# location /media {
|
||||
# root /opt/seafile/seafile-server-latest/seahub;
|
||||
# }
|
||||
}
|
||||
|
||||
location /media {
|
||||
root /opt/seafile/seafile-server-latest/seahub/media/
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user