Skip to content

Instantly share code, notes, and snippets.

@tuxity
Last active October 7, 2023 14:57
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save tuxity/bf52447fa393c40114210d7f6d623015 to your computer and use it in GitHub Desktop.
Save tuxity/bf52447fa393c40114210d7f6d623015 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