-
图片不能显示
2022-10-16 16:53解决了,谢谢
之前 nginx 的图片配置:
server { server_name images.5212345.cn; listen 80; location / { root /data/images; } }
今天突然想到是不是因为用了 http 的问题,所以加了一段
server { server_name images.5212345.cn; location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 10m; proxy_pass http://images.5212345.cn; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/5212345.cn/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/5212345.cn/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }
现在图片可以正常显示了
虽然可以显示了,但是我还是没有搞清楚,我访问的还是 http 的连接,确实可以访问了