search

Home  >  Q&A  >  body text

Nginx is used as a proxy and images cannot be displayed.

I use Nginx as a proxy server. Although it can perform normal proxying, the images cannot be displayed. What is the reason for this?
The following is the code of my Nginx proxy server:

    server {
        listen   8888;
        client_body_timeout 60000;
        client_max_body_size 1024m;
        send_timeout       60000;
        client_header_buffer_size 16k;
        large_client_header_buffers 4 64k;

        proxy_headers_hash_bucket_size 1024;
        proxy_headers_hash_max_size 4096;
        proxy_read_timeout 60000;
        proxy_send_timeout 60000;



        location / {
            resolver 8.8.8.8;
            proxy_pass http://$http_host$uri$is_args$args;
        }

    }

I guess it may be related to the cache time of the image, but I don’t know the specific solution yet. I hope someone can answer it.

漂亮男人漂亮男人2777 days ago679

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:12:17

    resolver 8.8.8.8? If you can't access the picture, it's because it's timed out. . . Try resolver 114.114.114.114 127.0.0.1 valid=3600s;

    reply
    0
  • Cancelreply