Skip to content

Instantly share code, notes, and snippets.

@Kshitij-Dhakal
Created July 19, 2023 09:22
Show Gist options
  • Save Kshitij-Dhakal/8881bb3529b546d678ba0efbe5edd61d to your computer and use it in GitHub Desktop.
Save Kshitij-Dhakal/8881bb3529b546d678ba0efbe5edd61d to your computer and use it in GitHub Desktop.
Dynamic route in nginx config
location ~ ^/v1/blog/(?<blogId>[^/]+) {
# Access the dynamic blogId value using the $blogId variable
proxy_pass http://blog_server;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment