Answer the question
In order to leave comments, you need to log in
How to configure API versioning in nginx?
There is an API for the application. The current version is 1.1. The application accesses it at: site.com/1.1/users The next version needs to be transferred to another framework, the root document should change accordingly and access will be
at
site.com/1.2/users
document root and rewrite? If you use just the form:
location /1.1/ {
root /var/www/api/1.1;
try_files $uri $uri/ index.php$is_args$args;
}
location /1.2/ {
root /var/www/api/1.2;
try_files $uri $uri/ index.php$is_args$args;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question