1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to change Plesk 10.4.4 default Port (8443)

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by ugurcane, Mar 8, 2012.

  1. ugurcane

    ugurcane Guest

    0
     
    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
     
  2. Dave.E

    Dave.E New Pleskian

    13
    35%
    Joined:
    Dec 3, 2011
    Messages:
    19
    Likes Received:
    0
    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.
     
  3. LefterisL

    LefterisL New Pleskian

    10
     
    Joined:
    Dec 19, 2012
    Messages:
    3
    Likes Received:
    0
    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
    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!
     
  4. AdrianaCalle

    AdrianaCalle New Pleskian

    10
     
    Joined:
    Jan 25, 2013
    Messages:
    1
    Likes Received:
    0
  5. LefterisL

    LefterisL New Pleskian

    10
     
    Joined:
    Dec 19, 2012
    Messages:
    3
    Likes Received:
    0
    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?
     
  6. marialuna3210

    marialuna3210 New Pleskian

    10
     
    Joined:
    Feb 14, 2013
    Messages:
    1
    Likes Received:
    0
  7. AntonKost

    AntonKost New Pleskian

    10
     
    Joined:
    Nov 21, 2012
    Messages:
    1
    Likes Received:
    0
    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.
     
  8. Ashwani_Bhat

    Ashwani_Bhat New Pleskian

    1
    20%
    Joined:
    Apr 29, 2015
    Messages:
    4
    Likes Received:
    0
Loading...