Score:1

Nginx Accessing Issues

us flag

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

djdomi avatar
za flag
is the page enabled ,are the logs top secret or is there a reason why you hide it?;)
Bloodshot_pico avatar
us flag
The page is enabled yeah. I can access it and everything. I just like keeping secrets. ;)
Score:1
us flag

This actually was the fix, I was just too impatient for my website to update. ':D

djdomi avatar
za flag
remember that you need to accept your answer after 24h ,else the question stays as unresolved forever ,thabks for the response
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.