So I've got Nginx up and running with different server blocks. However, when I've just tested an image on one of my sites it seems that it's not displaying it. Although it is on my local version of the site. I've looked around on the internet a little and I've seen people say add different things to the config of the site itself in the "sites-available" directory.
I've got this now:
server {
listen 80;
listen [::]:80;
root /var/www/server_domain.com/html;
index index.html index.htm index.nginx-debian.html;
server_name server_domain.com www.server_domain.com;
location / {
try_files $uri $uri/ =404;
}
location /css {
alias /var/www/server_domain.com/html/css;
}
location /images {
alias /var/www/server_domain.com/html/media/images;
}
location /videos {
alias /var/www/server_domain.com/html/media/videos;
}
location /music {
alias /var/www/server_domain.com/html/media/music;
}
location /fonts {
alias /var/www/server_domain.com/html/fonts;
}
location /scripts {
alias /var/www/server_domain.com/html/scripts;
}
}
I'm unsure how I would know if Nginx is having trouble find the image file itself, I'm basically not sure where I'd look or if I'd have to make a specific config change for logs to show etc.
Just very confused as to why I can't get this to work and why this isn't something that just works out of the box? It's a little finicky I get that and really cool on the customization, however I'm at a loss at the moment with this.
Any help would be greatly appreciated. :)
~Blood