From 5d4e9411005059c775e1b1ccd85100cd9484aedc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Jun 2016 15:56:40 +0200 Subject: [PATCH] Add nginx example file --- support/nginx/peertube | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 support/nginx/peertube diff --git a/support/nginx/peertube b/support/nginx/peertube new file mode 100644 index 000000000..21939c360 --- /dev/null +++ b/support/nginx/peertube @@ -0,0 +1,27 @@ +server { + listen 80; + server_name domain.tld; + + location / { + proxy_pass http://localhost:9000; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # For the video upload + client_max_body_size 100m; + } + + # Websocket tracker + location /tracker/socket { + # Peers send a message to the tracker every 15 minutes + # Don't close the websocket before this time + proxy_read_timeout 1200s; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_pass http://localhost:9000; + } +} -- 2.25.1