Skip to content

Instantly share code, notes, and snippets.

@gpproton
Forked from tuxity/nginx-stream.conf
Created June 24, 2019 14:20
Show Gist options
  • Save gpproton/4a1e87039f54574a6f6f9353bdda953f to your computer and use it in GitHub Desktop.
Save gpproton/4a1e87039f54574a6f6f9353bdda953f 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