Symptoms
-
The Site Preview button displays an error instead of showing site content:
Invalid URL was requested.
-
Server OS is Ubuntu 20.04 or 22.04.
-
Manually replacing
http
byhttps
in the preview link does make the site preview content to be displayed. -
There is no
location ^~ /plesk-site-preview/
directive underlisten IP_ADDRESS:443 ssl
in/etc/nginx/plesk.conf.d/server.conf
:# grep "location ^~ /plesk-site-preview/" /etc/nginx/plesk.conf.d/server.conf
#
Cause
This is the Plesk bug PPPM-14141 which will be solved in future Plesk updates.
Resolution
Until the bug be fixed, as workaround:
-
Log in to Plesk via
https://<server-IP-or-hostname>:8443
, e.g.https://203.0.113.2:8443
. - Navigate to Tools & Settings > Customize Plesk URL
- Select No custom URLs. Only https://<server-IP-or-hostname>:8443
- Save the changes
Command-line interface workaround:
-
Connect to the Plesk server via SSH.
-
Run the command below to set no custom URLs leaving Plesk accessible via default port 8443 only:
# plesk bin admin --disable-access-domain