How to change nginx default ports serverwide on Plesk server

Started by Suhitha, Sep 09, 2025, 08:18 AM

Previous topic - Next topic

Suhitha

Applicable to:

  • Plesk for Linux



Question

  • How to change default nginx ports on a Plesk server?
  • Can I switch the used HTTP and HTTPS ports on a Plesk server?


Answer

1.Connect to the server via SSH

2.Create a backup of the Plesk database by executing the following command (as a precautionary measure):

# plesk db dump > /root/psa.bkp
3.Change the port values for nginx in the Plesk database to the new ones by using the following command examples:

Note: You may replace 8080 and 44355 from the examples below to any other available ports according to your own needs

  • To change the HTTP port (default is 80) to 8080:

# plesk db "update ServiceNodeConfiguration set value='8080' where name='frontendPort' and section='webProxy';"
  • To change the HTTPS port (default is 443) to 44355:
# plesk db "update ServiceNodeConfiguration set value='44355' where name='sslFrontendPort' and section='webProxy';"
4.Run the following command in order to apply the changes to all web server configuration files:

# plesk repair web