nginx serving corrupt images

Maxim Dounin mdounin at mdounin.ru
Fri Feb 24 02:43:04 UTC 2023


Hello!

On Thu, Feb 23, 2023 at 06:32:11PM -0500, Saint Michael wrote:

> if I do this,
> root /static/duc/;
> 
>         location / {
> 
> rewrite ^ /index.html break;
> #try_files $uri $uri/ /index.html;
> # try_files /index.html =404;
> 
> }
> and open https://x3x.us/
> the images cannot be seen, it does not work.

You've asked nginx to return index.html to all requests, and 
that's what it does.  Obviously enough, index.html is not an 
image, so no images are expected to be accessible.

As previously suggested, just remove anything from "location /", 
and let nginx do it's job.

[...]

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list