3👍
✅
Your location /static
is wrong. The alias
directive substitutes parts of the URI when forming the pathname. The location
parameter and the alias
parameter should both end with a /
, or neither end with a /
:
location /static {
alias /root/se/env/public/static;
}
or:
location /static/ {
alias /root/se/env/public/static/;
}
In fact, because the alias
parameter ends with the location
parameter, you should not be using the alias
directive at all. See the note at the end of the alias
documentation.
location /static {
root /root/se/env/public;
}
Source:stackexchange.com