• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.

Issue Can no longer connect to nginx from localhost

Wade

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
18.0.57.3
At a semi-random time yesterday - possibly coinciding with a Plesk or Ubuntu update (apt full-upgrade) - my Plesk-operated web server became unreachable from localhost. This broke a cron job that was using Plesk's fetch_url against mydomain.com.

Ultimately I've narrowed it down to one of two problems, but I'm not sure which is "the" problem and thus which one to try to fix:
  1. /etc/hosts has an entry for mydomain.com redirecting to 127.0.1.1.
  2. Nginx is configured to listen only on the external IP address, not all interfaces.
Thus when I run e.g. curl https://mydomain.com from my server, it tries connecting to 127.0.1.1 instead of the public IP address, and Nginx is not listening on localhost, so I get a connection refused error.

I found various earlier forum threads about this issue (e.g. Can't access sites from localhost) but none have any resolution.

I also don't understand why this only just broke yesterday - it was working just fine before that. Alas I don't know what the relevant config files contained prior to this breakage.

As a workaround for the cron job, I was able to rewrite it as curl --header 'Host: mydomain.com' https://<external IP>, which is fine, I guess, although it'd be nice not to have to hard-code my external IP address into a random cron job (in case it changes in future - there's no way I'll remember to update this cron job).
 
Back
Top