Last active
May 5, 2020 02:02
-
-
Save SanthoshBabuMR/4e241a93a69668cda0cc10910f817cee to your computer and use it in GitHub Desktop.
nginx: setup reverse proxy ( Reroute all requests at port 8443 to a different IP:port )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install nginx | |
apt-get update | |
apt-get install nginx | |
unlink /etc/nginx/sites-enabled/default | |
# configure | |
cat > /etc/nginx/sites-available/reverse-proxy.conf | |
server { | |
listen 8443; | |
location / { | |
proxy_pass https://192.168.99.103:8443/; | |
} | |
} | |
# symlink | |
ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf | |
# test and restart service | |
service nginx configtest | |
service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment