When requesting pictures on nginx, sometimes the request does not receive 404. The current domain name is stg.xxx.com.
How to configure it so that when 404 occurs, nginx automatically reverse-proxyes to onlone.xxx.com to ensure image response. .
Thanks!
世界只因有你2017-05-16 17:17:17
location = /40x.html{
proxy_pass http://google.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
You can try it, I haven’t tested it yet. This answer is based on previous experience.