From 92765b79fe4cfdf33dcbb0b92322610fc9ea65ab Mon Sep 17 00:00:00 2001 From: Christian Haschek Date: Sat, 27 Nov 2021 16:41:26 +0100 Subject: [PATCH] prepare for api rewrite --- docker/rootfs/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/rootfs/nginx.conf b/docker/rootfs/nginx.conf index 825743e..6e48591 100644 --- a/docker/rootfs/nginx.conf +++ b/docker/rootfs/nginx.conf @@ -19,6 +19,13 @@ server { } } + location /api { + index api.php; + if (!-e $request_filename){ + rewrite ^(.*)$ /api.php?url=$1 last; + } + } + # logging access_log /var/log/nginx/opentrashmail/web.access.log; error_log /var/log/nginx/opentrashmail/web.error.log warn;