• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How to change Plesk 10.4.4 default Port (8443)

U

ugurcane

Guest
Hi guys,

how can i change the plesk's default access port from 8443 to 443, because we want to access plesk panel with 443 port not 8443.

such as https://plesksite.com

Is there any suggestion to do this action?

System Architecture

Linux Plesk 10.4.4
Redhat 5.7
x86_64

Thanks in advance

Note: i read this article, but it didn't resolve my case.

http://kb.parallels.com/en/138
 
its a bit tricky...

...but you can do.

There are two (and a half) possible ways to achive this.

You can't change the port just by changing it. The problem ist, that you have TWO web-servers running.
One for Plesk (lighttpd) and one for all your webs (apache).

Since Apache itself registeres the 443 Port by default, you are not able to start the plesk-server on port 443, too.

a)
The easyest way is to prevent apache from listening to 443-port. BUT then none of your webs will be able to use SSL.
If this is no problem for you (because you dont want or dont have webs, webmail or other stuff to be secured)
Just goto /etc/httpd/conf.d/ssl.conf and comment the line "LISTEN 443" out (set a hash # in front).
Restart apache
[~] service httpd restart
and check with
[~] netstat -tulpen
if the port :443 is not in use any more.
Now you have to tell lighttpd to use an other port than 8443.
Goto to file /etc/sw-cp-server/applications.d/plesk.conf and change 8443 to 443 (there are two entries)
Restart the Service
[~] /etc/init.d/sw-cp-server restart
and voilá - the Plesk-service is running on 443.


b)
If you want SSL still to be working with one ore more of your webs, you can try to use a local redirect
(Proxy/reverseproxy)
I have tried it first, but there is one problem: plesk uses the @-char in some of their urls in the frontend.
It seems that apache cant cope with these redirects. So some pages will be broken and cannot be reached by the browser! (I cant remember exactly what pages this were, but it were only a few, like filemanager, backupmanager)
To do this, create a domain or subdomain or select an already existing one on which plesk shall be reached.
Create a vhost_ssl.conf file if not already exists in /var/www/vhosts/<domain|subdomain>/conf/vhost_ssl.conf
with the following lines:
-snip--------------------------
RewriteEngine on
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^/(.*)$ https://<your domain or subdomain>/$1 [R=301,L]

ProxyPass / https://localhost:8443/
<Location />
ProxyPassReverse /
</Location>
SSLProxyEngine On

<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
-snap---------------------------
Now all requests to https://<your domain or subdomain> will be served by the localhost port 8443.
The rewriteCondition is to redirect non-SSL-requests to SSL-requests.


c)
If you want to have everything running (your webs use SSL and all of the frontend pages must work), you must have an unused (spare) IP-Address.
(maybe instead of using a spare IP-address this can also be done with SNI-support in apache, but I did not yet work with that so I can't tell)
Assuming you have IP1: 123.123.123.100 and a new or spare IP2: 123.123.123.200:
The new IP will be reserved by Plesk in future. (And your new domain or subdomain under that plesk can be reached must point to that IP!)
Now, quite similar to solution a, goto to apache config /etc/httpd/conf.d/ssl.conf and change the line "LISTEN 443"
to "LISTEN 123.123.123.100:443"
Restart apache
[~] service httpd restart
and check with
[~] netstat -tulpen
if Port :443 is now binding to only the old address
...123.123.123.100:443... ...httpd
Repeat the same for the Port 80: goto to apache config /etc/httpd/conf/httpd.conf and change the line "LISTEN 80"
to "LISTEN 123.123.123.100:80"
Restart apache
[~] service httpd restart
and check with
[~] netstat -tulpen
if Port :80 is now binding to only the old address
...123.123.123.100:80... ...httpd

Now the new IP2 is not in use by apache anymore and therefore free to be used by lighttpd.
Goto to file /etc/sw-cp-server/applications.d/plesk.conf and change 8443 to 443 AND 8080 to 80 (there are four entries)
And to connect lighttpd to only the new IP2 address:
In the file /etc/sw-cp-server/applications.d/plesk.socket.sh search for the line
\$SERVER["socket"] == ":$PORT" {
Add your IP2 there
\$SERVER["socket"] == "123.123.123.200:$PORT" {
And furtheron comment out:
# server.use-ipv6 = "enable"
(this was importand as i noticed that the server wouldnt start - maybe due to a misconfigured IPv6 interface. But since i dont use IPv6 - no problem)
Restart the Service
[~] /etc/init.d/sw-cp-server restart
and voilá - the Plesk-service is running on 80 and 443 under the new IP-Adress (IP2)
If you still want to have it run under the old ports, too - just copy and add the 4 lines in /etc/sw-cp-server/applications.d/plesk.conf with the old ports mentioned.


So - I hope, it will work for you, too.
I personally think, that it is a big disadvantage of Plesk, not to use the common Ports - as in most companys only port 443 can be used for SSL-secured http-connections.
And as you see - its a lot of config work to do to get it running though.
 
How to do this in Plesk 11.09?

I am trying to make plesk run on port 443 on a SECOND IP in the server but following this guide fails at the
Now the new IP2 is not in use by apache anymore and therefore free to be used by lighttpd.
Goto to file /etc/sw-cp-server/applications.d/plesk.conf and change 8443 to 443 AND 8080 to 80 (there are four entries)
And to connect lighttpd to only the new IP2 address:
In the file /etc/sw-cp-server/applications.d/plesk.socket.sh search for the line
\$SERVER["socket"] == ":$PORT" {
Add your IP2 there
\$SERVER["socket"] == "123.123.123.200:$PORT" {
And furtheron comment out:
# server.use-ipv6 = "enable"

As the file is completely different....

Any ideas on how to do this? Port 8443 is blocked by many firewalls and this issue needs a solid solution.

Thanks!
 
AdriannaCalle

No not yet. Have tried but cannot find

In the file /etc/sw-cp-server/applications.d/plesk.socket.sh search for the line
\$SERVER["socket"] == ":$PORT" {
Add your IP2 there
\$SERVER["socket"] == "123.123.123.200:$PORT" {

I guess that Plesk 11 has changed the conf files so I cannot find where to bind the 2nd ip address to port 443

Any ideas?
 
Some news here?
I have the same problem!
I want to bind plesk to a second ip on port 443 but cannot find something helpful.
 
Back
Top