mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
# when running copyparty behind a reverse proxy,
|
|
# the following arguments are recommended:
|
|
#
|
|
# -nc 512 important, see next paragraph
|
|
# --http-only lower latency on initial connection
|
|
# -i 127.0.0.1 only accept connections from nginx
|
|
#
|
|
# -nc must match or exceed the webserver's max number of concurrent clients;
|
|
# nginx default is 512 (worker_processes 1, worker_connections 512)
|
|
#
|
|
# you may also consider adding -j0 for CPU-intensive configurations
|
|
# (not that i can really think of any good examples)
|
|
|
|
upstream cpp {
|
|
server 127.0.0.1:3923;
|
|
keepalive 120;
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
server_name fs.example.com;
|
|
|
|
location / {
|
|
proxy_pass http://cpp;
|
|
proxy_redirect off;
|
|
# disable buffering (next 4 lines)
|
|
proxy_http_version 1.1;
|
|
client_max_body_size 0;
|
|
proxy_buffering off;
|
|
proxy_request_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;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Connection "Keep-Alive";
|
|
}
|
|
}
|