• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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