The images are there and the filepaths for the images exist. I can open the website on the server to see that all the images work, and I can open the website on my computer to see that the website works, some of the images do not load. But also opening it on some phones the website does not load, dns probe error on chrome, But on my phone it works, edge browser, but also some images don’t load.
May or may not be related to IPv6. Depending on the provider and/or specific setup on the phone, they might not want to connect via IPv4:
[tarulia@localhost ~]$ ping ottocar.fi -4 -c 1
PING ottocar.fi (31.217.196.214) 56(84) bytes of data.
64 bytes from hotelli05.domainhotelli.fi (31.217.196.214): icmp_seq=1 ttl=55 time=47.7 ms
--- ottocar.fi ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 47.665/47.665/47.665/0.000 ms
[tarulia@localhost ~]$ ping ottocar.fi -6 -c 1
ping: ottocar.fi: Name or service not known
But the question was also whether your webserver-user has access to those files, i.e. of the permissions are set correctly.
It might be that the “working” images are only giving a false positive and only appear to be working even though they are not. I’ve had that happen before when the URL is still in some cache server somewhere and you get it delivered.
Best option: Look into the server logs, if it’s returning a 404 it should also be logging why it returned it and why it couldn’t find/access the file.
It appears partially working for me. Looks as if it is all there but the images for the specific vehicles, only two of those show up the Scenic and Saab 96
Whatever user the webserver process is running under (for instance, on Linux, Apache runs as www-data) needs to have access to those image files.
If you were running Apache, and uploaded the files and gave Apache access to them (either knowingly, or by default), and Apache ran as www-data, but now you switched to Nginx, and Nginx runs as (I have no idea) nginx-server, then nginx-server can’t access www-data’s files, even if you point it there.
You need to make sure nginx-server (or whatever user is running nginx) has permission to access the files.
Run top and see what user is running the nginx server? And then check permissions on the ottocar directory and see if that user has the right permissions, recursively.
You cant change the owner without knowing who to set the owner to
Docker on windows server is not a standard setup many would use. You’re going to be working with linux commands and linux permissions translated to a windows environment. Linux can work with ACLs but its usually simpler to not use them for this use case.
Something we can try as an alternative is to set /img/ to 644 permissions recursively.
This should give everyone the ability to read anything below the img directory and the owner the ability to read + write
Docker is primarily geared towards linux and on windows it utilizes WSL. This comes with some caveats if you ever need to virtualize since WSL is now reliant on hyper-v. I wont tell you that you shouldnt use docker on windows but that you should strongly consider if what you’re doing makes sense.
Well we had this license and we were like, lets do it. I have no idea anymore what I’m doing on the server, it used to be simply xampp and few other things on windows 10 machine.
I did that command and restarted the container. Doesn’t seem to work
I would suggest you take some time to learn some linux fundamentals before standing up a webserver exposed to the internet… however I’m not your mother so you can do as you please.
whats the output of ls -la /usr/share/nginx/html/ottocar/img?
Well I’ve been using linux for a while but never got a fond of it , it just doesn’t feel good. Feel unpolished, we gotta take this to another thread or so.
The permissions, while probably not the best configuration, should allow the images to load. So the problem must lie somewhere else… I’m guessing in the way the images are referred in the html.