Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@RizkyRajitha
Last active January 22, 2021 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RizkyRajitha/c87f44f5f6f94bfcccc62a217afed8ba to your computer and use it in GitHub Desktop.
Save RizkyRajitha/c87f44f5f6f94bfcccc62a217afed8ba to your computer and use it in GitHub Desktop.
nginx path based routing config
events {
}
http {
server{
listen 80;
proxy_set_header Host $host;
proxy_set_header X-Forwared_For $remote_addr;
location /api1 {
proxy_pass http://localhost:8080/;
}
location /api2 {
proxy_pass http://localhost:8081/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment