Skip to content

Instantly share code, notes, and snippets.

@lalizita
Last active June 23, 2022 15:32
Show Gist options
  • Save lalizita/c504dffd99a803d67590962c1164ca02 to your computer and use it in GitHub Desktop.
Save lalizita/c504dffd99a803d67590962c1164ca02 to your computer and use it in GitHub Desktop.
Simple serverse proxy example using NGINX
# The event key is required for nginx
events{
worker_connections 1024;
}
http {
server {
listen 8080;
# location is the key for your endpoint to access nginx configurarion
# example: curl -v http://localhost:8080/ will access this location
location / {
# if you access http://localhost:8080/ will redirect you to google site
proxy_pass https://google.com;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment