From 503e43da5d9f211d812eb3310bcedff4843e1934 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 25 Sep 2024 15:36:20 -0400 Subject: [PATCH] Document the /uploads location more thoroughly --- installation/pleroma.nginx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 5d547729a..40ab61326 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -127,6 +127,18 @@ server { chunked_transfer_encoding on; proxy_pass http://phoenix; } + + # Nginx can serve the local file uploads directly reducing work for + # the backend. Make sure to change this to a "deny all" if you use + # a dedicated subdomain. It will break access to uploads that have already + # federated if you are converting an existing installation, so weigh the risks + # carefully. + # + # location /uploads { + # root /var/lib/pleroma; <-- make sure this is correct for your deployment + # allow all; + # } + } # It is strongly recommended that you host your media and the mediaproxy on a dedicated subdomain for security reasons. @@ -185,7 +197,7 @@ server { # proxy_set_header Host $http_host; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # -# location ~ /uploads { +# location /uploads { # root /var/lib/pleroma; # allow all; # }