Skip to content

Instantly share code, notes, and snippets.

@wmelton
Forked from jujhars13/proxy.nginx.conf
Created August 30, 2022 10:42
Show Gist options
  • Save wmelton/a3f1d7b570c06da191798ef018edaa2e to your computer and use it in GitHub Desktop.
Save wmelton/a3f1d7b570c06da191798ef018edaa2e to your computer and use it in GitHub Desktop.
nginx-mysql-proxy
#sudo wget http://nginx.org/download/nginx-1.9.12.tar.gz
#sudo tar -xvzf nginx-1.9.12.tar.gz
#cd nginx-1.9.12
#sudo apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g-dev
#sudo ./configure --with-stream && sudo make && sudo make install
# /usr/local/nginx/conf/nginx.conf - NGINX configuration file
worker_processes 1;
events {
worker_connections 1024;
}
stream {
server {
listen 3306;
proxy_pass my-instance-rds.mysq-aws-account.eu-west-2.rds.amazonaws.com:3306;
}
}
/usr/local/nginx/sbin/nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment