[NGINX] Make API docs accessible using /api/

master
ntimo 2019-10-02 22:13:47 +02:00
parent 73772275c9
commit 5cf74f6b85
No known key found for this signature in database
GPG Key ID: 3AF3627FB0440D55
1 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,10 @@ server {
rewrite ^(.*)$ $1.php last; rewrite ^(.*)$ $1.php last;
} }
location /api/ {
try_files /_apidocs.html;
}
location ~ ^/api/v1/(.*)$ { location ~ ^/api/v1/(.*)$ {
try_files $uri $uri/ /json_api.php?query=$1; try_files $uri $uri/ /json_api.php?query=$1;
} }