Symptoms
-
Log in to WordPress instance via Site Preview link http://203.0.113.2/plesk-site-preview/www.example.com/192.0.2.2/wp-login.php leads to a page timeout error:
This site can’t be reached
192.0.2.2 took too long to respond.
...
ERR_CONNECTION_TIMED_OUT -
Plesk is installed from a cloud image, for example, Plesk Onyx (BYOL) from AWS Marketplace.
-
Plesk is behind NAT. The private IP address is 192.0.2.2 and the public IP address is 203.0.113.2. IP mapping is configured in Tools & Settings > IP addresses
-
The Default Quick Preview mode is enabled in Tools & Settings > Website Preview Settings.
-
Incorrect site preview link is opening after CMS credentials submitting:
http://192.0.2.2/plesk-site-preview/www.example.com/192.0.2.2/wp-admin/
instead of correct one:
http://203.0.113.2/plesk-site-preview/www.example.com/192.0.2.2/wp-admin/
Cause
This is a Plesk bug with ID PPPM-10371 which is planned to fixed in one of the future product updates.
The outdated configuration for site preview is delivered with Plesk cloud image.
Resolution
Warning: Plesk Preview is not intended to log into the CMS and does not use a secure HTTPS connection. It is strongly recommended not to use it to log into the CMS in order to avoid password sniffing by third-parties.
As a workaround, update the configuration file according to the steps below:
-
Connect to the server via SSH.
-
Backup the current configuration file:
# cp /etc/sw-cp-server/conf.d/plesk_site_preview.conf{,bak}
-
Download the archive with the new configuration file plesk_site_preview.zip and unpack it with replacement to
/etc/sw-cp-server/conf.d/
:# wget https://plesk.zendesk.com/hc/article_attachments/360031457873/plesk_site_preview.zip
# unzip plesk_site_preview.zip -d /etc/sw-cp-server/conf.d/ -
Reload the
sw-cp-server
service to apply the changes:# service sw-cp-server reload