Skip to content

Override path for serving static files #2627

Closed Answered by oom-
oom- asked this question in Q&A
Discussion options

You must be logged in to vote

Yes ok, in the end was pretty simple. : https://github.com/nginx-proxy/nginx-proxy/tree/main/docs#per-virtual_host

just wrote a custom conf static.conf:

location /img/avatars/{
    alias /var/avatars/;
    autoindex on; #<-- for debuging purpose
    access_log off;
    expires 30d;
}

and mounted it there: /etc/nginx/vhost.d/mydomain.com

works like a charm.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by buchdag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant