如果使用whm/cpanel面板的Transfer功能之后出现502 Proxy Error

2020年10月19日 | tags | views 1874
Comments 0

u=2178928599,1291714967&fm=26&gp=0.jpg

报错如下:

502 Proxy Error 

The proxy server received an invalid response from an upstream server. 

The proxy server could not handle the request


Reason: DNS lookup failure for: xxx.xxx.tld


Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request.

原因是:

cpanel/whm的最新Transfer功能中,增加了一个"Live Transfer" 功能,默认是开启的,如果使用不习惯最好都关闭掉,因为他会帮你直接把所有的解析和dns都转移到新服务器。固然老服务器就报错了。

要恢复老服务器的使用,使用以下命令:

1.先移除老服务器的代理服务器配置,命令如下:
cut -d":" -f1 /etc/trueuserowners | while read user;do whmapi1
unset_all_service_proxy_backends username=$user;done

2.代理服务器移除之后要重建以下apache,命令如下:

/scripts/rebuildhttpdconf

/scripts/restartsrv_httpd

3.然后你会发现网站打开还是显示*****/cgi-sys/movingpage.cgi的页面,这个就需要你到服务器里面的每个cpanel的重定向功能里面,去删除掉重定向的页面,每个重定向的页面都去删除了。这个没有批量处理的方法,只能一个一个去手工删除。
4.删除完重定向之后,你的网站就都恢复了。

问题比较复杂,教程拿走不谢!!!!!!如果真心想感谢,在你网站里面帮我做一个链接就行了。

下面是英文版:

Errors are reported as follows:


502 Proxy Error

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request

Reason: DNS lookup failure for: xxx.xxx.tld

Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request.


as a result of:


In the latest transfer function of cPanel / WHM, a "live transfer" function is added, which is enabled by default. If you are not used to it, you'd better turn it off, because it will help you transfer all the resolution and DNS to the new server directly. Of course, the old server reported an error.


To restore the use of the old server, use the following command:

1. Remove the proxy server configuration of the old server. The command is as follows:

cut -d":" -f1 /etc/trueuserowners | while read user;do whmapi1
unset_all_service_proxy_backends username=$user;done

2. After the proxy server is removed, rebuild the following Apache. The command is as follows:

/scripts/rebuildhttpdconf

/scripts/restartsrv_httpd

3. Then you will find that the website is open or displayed with ¥ * * / CGI sys/ movingpage.cgi This requires you to go to the redirection function of each cPanel in the server to delete the redirected page, and delete each redirected page. There is no batch processing method. You can only manually delete one by one.


4. After deleting the redirection, your website will be restored.


The problem is more complicated, the tutorial is not appreciated!!!!!! If you really want to thank you, help me make a link in your website.