Answer the question
In order to leave comments, you need to log in
How to setup nginx for REST API?
Trying to follow this tutorial https://youtu.be/COb-KpOfCSw?t=1810
It uses apache server and I want to use nginx.
I need all requests sent to mydomain.com/api/ to be handled through the api.php script
AND somehow placed in the $_GET['q'] variable so that it is available in my api.php script
Answer the question
In order to leave comments, you need to log in
location / {
try_files $uri $uri/ /api.php?$args;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question