Anders (izzno / gooood) πŸ‡³πŸ‡΄
so that does not matter
Leonardo
hm
Leonardo
crap
Anders (izzno / gooood) πŸ‡³πŸ‡΄
but list the dirs as well
Anders (izzno / gooood) πŸ‡³πŸ‡΄
file permissions are as follows user:groux xxx_owner xxx_group xxx_everyone
Anders (izzno / gooood) πŸ‡³πŸ‡΄
and everyone can read those files, and if your dir is the same then this is not the proble,
Leonardo
hmmmm got it
Leonardo
so maybe what's the problem then?
Anders (izzno / gooood) πŸ‡³πŸ‡΄
I dont know nginx that well im afraid, but i think that is your problem...
Anders (izzno / gooood) πŸ‡³πŸ‡΄
I just use nginx as proxies towards "whole" domains.
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Then i wrap the aps in docker...
Anders (izzno / gooood) πŸ‡³πŸ‡΄
:D
Anders (izzno / gooood) πŸ‡³πŸ‡΄
how do you point to media in your templates ?
Leonardo
{{ obj.file.url }}
Anders (izzno / gooood) πŸ‡³πŸ‡΄
What does it translate to? (if you view the html ?
Leonardo
do you wanna know what's the value of that attribute?
Anders (izzno / gooood) πŸ‡³πŸ‡΄
when you browse your application in production does it translate correctly ?
Leonardo
what you mean with translate?
Anders (izzno / gooood) πŸ‡³πŸ‡΄
if you view the webpage source code, does it point to /media/something
Leonardo
probly to media/filename
Anders (izzno / gooood) πŸ‡³πŸ‡΄
yes but is it ?
Anders (izzno / gooood) πŸ‡³πŸ‡΄
is 22316.pdf in you media dir ?
Leonardo
yes
Leonardo
the file name is this number
Anders (izzno / gooood) πŸ‡³πŸ‡΄
yep, strange
Leonardo
pretty
Leonardo
is the same dir then static files
Leonardo
but static works fine
Leonardo
i don't understand what's happening...
Anders (izzno / gooood) πŸ‡³πŸ‡΄
open the css and compare the url
Anders (izzno / gooood) πŸ‡³πŸ‡΄
and try /static/fakefile.css
Anders (izzno / gooood) πŸ‡³πŸ‡΄
look at the feedback, is it canonical or the same as above
Rajjix
are you using nginx ?
Rajjix
can you share your conf please and your settings urls for media
Leonardo
nginx: https://pastebin.com/qUArAfab
Leonardo
settings: https://pastebin.com/KFmUjxJy
Anders (izzno / gooood) πŸ‡³πŸ‡΄
your media is one charecter shorter
Anders (izzno / gooood) πŸ‡³πŸ‡΄
"whitespace"
Leonardo
open the css and compare the url
http://ambiente.eranalitica.com.br/static/css/base.cssworked
Rajjix
can u confirm that django is serving the media file with the correct uri ?
Leonardo
http://ambiente.eranalitica.com.br/static/css/fake.css not found
Rajjix
Ur settings look good
Anders (izzno / gooood) πŸ‡³πŸ‡΄
He's static urls are canocal but media is not...
Rajjix
show me the function where you provide the path for the given media
Anders (izzno / gooood) πŸ‡³πŸ‡΄
huh?
Does not really matter.... You dont need the white space in front of your alias declarations
Leonardo
yeah i have a whitespace in static/ row too and it's working fine
Leonardo
so that's not a prob
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Yes, but theres a difference in the whitespace.
Rajjix
i think the problem is with ur django views function
Anders (izzno / gooood) πŸ‡³πŸ‡΄
static has three meda has two, so if it matters.
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Leonardo
{{ obj.file.url }}
Anders (izzno / gooood) πŸ‡³πŸ‡΄
Hes asking for you code in views.py
Rajjix
what about ownership on your media folder?
Anders (izzno / gooood) πŸ‡³πŸ‡΄
We checked that as well ;)
Leonardo
ok the whitespace is equal for both lines
Anders (izzno / gooood) πŸ‡³πŸ‡΄
restart nginx
Anders (izzno / gooood) πŸ‡³πŸ‡΄
sudo systemctl restart nginx
Rajjix
sudo systemctl restart nginx
and also check journalctl -xe
Leonardo
worked
Leonardo
idk what i did '-'
Leonardo
btw, thank you very much @izznogooood and @Rajjix
Leonardo
i think i know what was the prob
Leonardo
my nginx status was broken
Leonardo
so i changed some file configs and restarted
Leonardo
thank you guys, you're awesome!
Anders (izzno / gooood) πŸ‡³πŸ‡΄
👍
Rajjix
Nice 👍
Leonardo
the problem was that lines access_log /home/user/logs/access.log; error_log /home/user/logs/error.log;
George
:)
Leonardo
the nginx was not finding that log files
Leonardo
appreciate you too @trenixjetix ;)
George
:)