0

uWSGI manual on static files serving states that:

You can specify multiple --static-map options, even for the same mountpoint.

--static-map /images=/var/www/img --static-map /images=/var/www/img2 --static-map /images=/var/www/img3

The file will be searched in each directory until it’s found, or if it’s not, the request will be managed by your app.

I'm looking for a way to pass multiple options through env var like this:

UWSGI_STATIC_MAP="/images/=/var/www/img1/"
UWSGI_STATIC_MAP="/images/=/var/www/img2/"
UWSGI_STATIC_MAP="/images/=/var/www/img3/"

but, of course, var values will be overwritten, so there must be some syntax for one-shot declaration (or not).

Documentation about configuring uWSGI via env vars is rather scarce and most information I found is in this tutorial on caktusgroup.com, which states that "uWSGI is almost entirely configurable through environment variables".

Any help/hint appreciated.

0

OK, I've finally found in the documentation the one sentence I was looking for:

Several values for the same configuration variable are not supported with this method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.