From 7c972e2036a6a58e0248f87f82153a930a9ab78f Mon Sep 17 00:00:00 2001 From: Ng Kiat Siong Date: Mon, 25 Nov 2024 15:45:48 +0800 Subject: [PATCH] Inserted sample nginx config for API in api_nginx-frontend.conf --- dev/openmage/nginx-frontend.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev/openmage/nginx-frontend.conf b/dev/openmage/nginx-frontend.conf index ddc1d51873e..31942dc8b00 100644 --- a/dev/openmage/nginx-frontend.conf +++ b/dev/openmage/nginx-frontend.conf @@ -153,6 +153,15 @@ server { location /api/ { return 404; } location /api.php { return 404; } + # Clients use the frontend to call API + #location /api { + # root $webroot; + # rewrite ^/api/(\w+).*$ /api.php?type=$1 last; + # set $fastcgi_script_filename $webroot/api.php; + # set $fastcgi_script_name2 /api.php; + # try_files NOT_EXISTS @php-fpm; + #} + # Protect dot files no matter where they are located location ~ /\. { return 404; }