Skip to content

Instantly share code, notes, and snippets.

@malikshi
Forked from tuxity/nginx-stream.conf
Created February 5, 2020 19:08
Show Gist options
  • Save malikshi/94c743855c4a30ddb90f21474ec077f7 to your computer and use it in GitHub Desktop.
Save malikshi/94c743855c4a30ddb90f21474ec077f7 to your computer and use it in GitHub Desktop.
stream {
log_format basic '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time';
access_log /var/log/nginx/access.log basic;
error_log /var/log/nginx/error.log debug;
include /etc/nginx/stream.conf.d/*.conf;
}
#!/bin/bash
sed -i 's/nginx;/root;/g' /etc/nginx/nginx.conf
cat nginx-stream.conf >> /etc/nginx/nginx.conf
mkdir /etc/nginx/stream.conf.d
cp teamtacos.fathosting.io.conf /etc/nginx/stream.conf.d
upstream ts_udp_teamtacos {
server teamspeak-3.marathon.mesos:21770;
}
server {
listen 9987 udp;
proxy_bind $remote_addr transparent;
proxy_pass ts_udp_teamtacos;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment