nginx image 404 directs to another domain name
大家讲道理
大家讲道理 2017-05-16 17:15:17
0
1
429

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!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
世界只因有你
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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template