diff --git a/paperless.subdomain.conf.sample b/paperless.subdomain.conf.sample index 7692091c3..c4f070dc8 100644 --- a/paperless.subdomain.conf.sample +++ b/paperless.subdomain.conf.sample @@ -43,4 +43,14 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + + location ~ (/paperless)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app paperless; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } } diff --git a/paperless.subfolder.conf.sample b/paperless.subfolder.conf.sample index 73f6bafec..f51996d7c 100644 --- a/paperless.subfolder.conf.sample +++ b/paperless.subfolder.conf.sample @@ -28,3 +28,13 @@ location ^~ /paperless/ { proxy_pass $upstream_proto://$upstream_app:$upstream_port; } + +location ~ (/paperless)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app paperless; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +}