Skip to content

Instantly share code, notes, and snippets.

@darkcl
Created April 30, 2018 09:51
Show Gist options
  • Save darkcl/7bb10224efad373f2750f3f7c9eeaab4 to your computer and use it in GitHub Desktop.
Save darkcl/7bb10224efad373f2750f3f7c9eeaab4 to your computer and use it in GitHub Desktop.
Nginx Config
server {
listen 80;
access_log /var/log/nginx/api.log;
error_log /var/log/nginx/api_error.log;
server_name localhost;
location ^~ / {
proxy_pass http://api_one;
}
location ^~ /v2 {
rewrite ^/v2/(.*)$ /$1 break;
proxy_pass http://api_two;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment