Question
How to perform Plesk redirect from http://plesk.example.com:8880 to https://plesk.example.com:8443?
Answer
Warning: Port 8880 is required by Web Presence Builder and for integration with Virtuozzo containers offline management services. Do not modify it in case of the integration with 3rd-party software.
-
Connect to the server via SSH.
-
Make a backup of
/etc/sw-cp-server/conf.d/plesk.conf:
# cp /etc/sw-cp-server/conf.d/plesk.conf /etc/sw-cp-server/conf.d/plesk.conf_backup
-
Modify the content of
/etc/sw-cp-server/conf.d/plesk.conf
so it looks like below:server{
listen 8880;
listen 127.0.0.1:8880 default_server;
return 301 https://$host:8443$request_uri;
}
server {
listen 8443 ssl;
include conf.d/*ipv6_ports.inc;
ssl_certificate /opt/psa/admin/conf/httpsd.pem;
ssl_certificate_key /opt/psa/admin/conf/httpsd.pem;
include conf.d/*plesk.inc;
include conf.d/*wpb.inc;
} -
Restart
sw-cp-server
service:# service sw-cp-server restart