Applicable to:
- Plesk for Linux
Question
How to change the port 8443 port for HTTPS and 8880 port for HTTP for the Plesk interface for Linux?
Answer
Warning: For many systems, Plesk must be accessible on the default ports. Port 8443 is used by external management and provisioning systems (Odin Service Automation, OBA-S, Customer & Business Manager) to communicate with Plesk, while port 8880 is required by Web Presence Builder and for integration with Virtuozzo containers offline management services.
Warning: Migration manager does not work with custom Plesk ports. In case custom ports are set to Plesk, migration between two Plesk panels will fail.
Warning: This article is meant to change Plesk ports to other non-standard ports. To change the Plesk port to standard HTTPS, refer to How to make Plesk interface accessible over a hostname without entering the port number.
-
Connect to the server using SSH.
-
Use any text editor to change the ports in
/etc/sw-cp-server/conf.d/plesk.conf
file:MYSQL_LIN: listen 8443 ssl;
listen 8880;
listen 127.0.0.1:8880 default_server; -
Do the same for
/etc/sw-cp-server/conf.d/ipv6_ports.inc
file:MYSQL_LIN: listen [::]:8443 ipv6only=on ssl;
listen [::]:8880 ipv6only=on; -
Change ports in
/etc/sw-cp-server/conf.d/plesk_site_preview.conf
file too:MYSQL_LIN: listen 127.0.0.1:8880;
-
Restart sw-cp-server and sw-engine in order to apply the changes:
# service sw-cp-server restart
# service sw-engine restartNote: Make sure the new ports specified are open in firewalls, both local and intermediate. See the article for details on firewall rules management in Plesk.
Custom ports will be rewritten to default ones by Plesk updates. Create a scheduled cron task to run a command that will automatically replace default port with custom one and reload Plesk frontend every few minutes:
sed -i 's/8443/8444/g' /etc/sw-cp-server/conf.d/plesk.conf /etc/sw-cp-server/conf.d/ipv6_ports.inc && systemctl reload sw-cp-server
Comments
0 comments
Please sign in to leave a comment.