• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Curl problem

Alberto Almagioni

New Pleskian
I have a problem with curl.
I set up a server with Debian 9 and Plesk 17 and I moved there a website.
In this site I’m using curl to call a web service on the same domain: something like https://dev.domain.tld calling https://dev.domain.tld/functions/services.php
On my previous server (not managed with plesk) everything was working.
Here curl doesn’t work.
After a lot of googling I find a workaround putting the local ip associated with the host name in /etc/hosts
Now everything is working so I guess is a routing problem but I can’t find a way to solve it.
The server is on a /24 network. I can ping the public ip of the server from server itself but I can’t navigate (lynx) the site without the trick of hosts file...
as this is a workaround and not a solution I’d like to understand how to solve but as I’m very “newbie” on Plesk, probably I set something wrong on the server.
Thank you
Alberto
 
Under Tools > IP Addresses - associated the Public IP to local internal IP then configure Plesk DNS for the website. This will allow websites to resolve internally without having to use /etc/hosts file. Your Scheduled Task - Fetch as URL or curl www.domain.com to resolve and execute.

Note that you will need to install the Plesk DNS extension.

The one downside of this is that internally, the website will resolve to external IP which can become an issues in some circumstances.
 
Back
Top