• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Calling a page on a Plesk 11.5 server, from said server: error

LionelM

New Pleskian
Hi there,

I am managing a CentOS 6 server (running on Amazon EC2) with Plesk 11.5. Recently, we noticed something strange, when trying to set up a cron job. The cron job calls a URL on the server. The URL is certainly correct, as calling it from our own machines works fine. However, a wget or a curl from the server itself returns a Plesk default page, even when run as root.

Another issue, most probably related to the above problem, arises when trying to open a page on the server from a php script: calling

Code:
echo file_get_contents('http://my-domain-on-plesk-server.com/animage.png');

Fails with the following error:

Code:
 Warning: file_get_contents(http://my-domain-on-plesk-server.com/animage.png): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vhosts/myhost/myscript.php on line 5

But getting the contents of a page not hosted on the server, such as google.co.uk, works perfectly well.

I suspect a configuration issue with either Apache or nginx, but I'm not quite sure where to look. Any ideas?
 
Back
Top