返回404状态码----需要利用反向代理
error_page 404 /404_main/$document_uri;
# 404
location /404_main{
proxy_pass http://10.10.128.62:8084/;
proxy_redirect http://10.10.128.62:8084/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
}
返回200的状态码----后面直接配置HTTP的URL
error_page 404 /404_main/$document_uri;
# 404
location /404_main{
proxy_pass http://10.10.128.62:8084/;
proxy_redirect http://10.10.128.62:8084/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
}
返回200的状态码----后面直接配置HTTP的URL