After a Nextcloud Server upgrade, I was not able to open the Apps management page. It showed a 504 error. It seems that the upstream page can not be reached. The log message shows something like the following:
GuzzleHttp\Exception\ConnectException: cURL error 28: Failed to connect to www.startpage.com port 80: Connection timed out
Then I realized that the domain “www.startpage.com” apparently is blocked here in China and of cause it can not be reached from my server. But, what is this domain used for in NextCloud?
I searched the source code in: https://github.com/nextcloud/server/search?q=www.startpage.com, and found that in config.php, by default the following domains are used to test the network connectivity of your NextCloud server:
'connectivity_check_domains' => [ 'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org' ],
As such, in case any of the above domains is not reachable, then you are not able to load your apps pages as Nextcloud Server will believe your server is not connected to the World Wide Web.
As a result, the solution is to change this setting to another domain which can be used to test your network connectivity. In your config.php, add the following lines:
'connectivity_check_domains' => [ 'www.baidu.com', ],