Symptoms
-
When opening a website in preview mode, the following error is shown in a web-browser:
PLESK_INFO: 403 Forbidden
-
The following error messages appear in
/var/log/sw-cp-server/error_log
:[error] 12464#0: *103 [lua] access_by_lua(plesk_site_preview.conf:18):9: Forbidden for IP: https, client: 127.0.0.1, server: plesk-site-preview.local, request: "GET /plesk-site-preview/example.com/https/*****/ HTTP/1.0", host: "plesk-site-preview.local"
Cause
The file /etc/sw-cp-server/conf.d/plesk_site_preview.conf
is corrupted.
Resolution
Â
Â
-
Connect to the Plesk server via SSH.
-
Create a backup of the original config file, if exists:
# mv /etc/sw-cp-server/conf.d/plesk_site_preview.conf{,.bak}
-
Download the default file:
# wget https://plesk.zendesk.com/hc/article_attachments/360015823659/obsidian_plesk_site_preview.conf.gz
-
Unzip the downloaded file:
# gunzip obsidian_plesk_site_preview.conf.gz
-
Move the file to the
/etc/sw-cp-server/conf.d/
directory.# mv obsidian_plesk_site_preview.conf /etc/sw-cp-server/conf.d/plesk_site_preview.conf
-
Restart the sw-cp-server service:
# service sw-cp-server restart
Â
Â
-
Connect to the Plesk server via SSH.
-
Create a backup of the original config file, if exists:
# mv /etc/sw-cp-server/conf.d/plesk_site_preview.conf{,.bak}
-
Download the default file:
# wget https://plesk.zendesk.com/hc/article_attachments/360005940560/plesk_site_preview.conf.gz
-
Unzip the downloaded file:
# gunzip plesk_site_preview.conf.gz
-
Move the file to the
/etc/sw-cp-server/conf.d/
directory.# mv plesk_site_preview.conf /etc/sw-cp-server/conf.d/
-
Restart the sw-cp-server service:
# service sw-cp-server restart
Â