How to configure a redirect from the domain name/IP address to the server hostname on port 8443 in Plesk for Linux?

Follow

Comments

7 comments

  • Avatar
    Bernhard

    Hi Nikita,

    thx for that tutorial. It works for me, but now I have the problem that the Plesk Migrator throws this error:

    Failed to check Plesk API connection to target Plesk server: HTTP request to 'https://1.2.3.4:8443/enterprise/control/agent.php' failed with 301 code. When I empty the z-plesk.inc file everything works as expected.

    I've tried different solutions like that, but all didn't work (and it's the first time I'm working with nginx config files:

    set $redir 1;
    if ($host ~ 'example.com'){ set $redir 0; }
    if ($host ~ '1.2.3.4'){ set $redir 0; }
    if ($redir = 1){ rewrite ^/(.*)$ https://example.com:8443/$1 permanent; }

    Thanks for your help.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Bernhard,

    A deeper investigation is required.

    Please, consider submitting a request for Plesk support.

    0
    Comment actions Permalink
  • Avatar
    Greg Sevatos

    The redirect from a domain name to hostname solution at the bottom of the article conflicts with the Advanced Monitoring extension in Plesk. Soon as i removed the above redirect, Advanced Monitoring started working again.

    0
    Comment actions Permalink
  • Avatar
    amarjeet (Edited )

    Follwed all the steps but when i have restarted server i got error.

    [root@server conf.d]# service sw-cp-server restart && service sw-engine restart
    Restarting sw-cp-server (via systemctl): Job for sw-cp-server.service failed because the control process exited with error code. See "systemctl status sw-cp-server.service" and "journalctl -xe" for details.
    [FAILED]

    [root@server ~]# systemctl status sw-cp-server.service
    ● sw-cp-server.service - Startup script for Plesk control panel server
    Loaded: loaded (/usr/lib/systemd/system/sw-cp-server.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/sw-cp-server.service.d
    └─respawn.conf
    Active: activating (auto-restart) (Result: exit-code) since Sun 2020-04-26 14:49:39 EEST; 4s ago
    Process: 8734 ExecStartPre=/usr/sbin/sw-cp-serverd -q -t (code=exited, status=1/FAILURE)

    Apr 26 14:49:39  systemd[1]: Failed to start Startup script for Plesk control panel server.
    Apr 26 14:49:39  systemd[1]: Unit sw-cp-server.service entered failed state.
    Apr 26 14:49:39  systemd[1]: sw-cp-server.service failed.

     

    any clue?

    0
    Comment actions Permalink
  • Avatar
    Francisco Garcia

    Hi amarjeet,

    What steps did you follow? What Plesk version you use? And what is what you want to do exactly? What kind of redirect?

    0
    Comment actions Permalink
  • Avatar
    eamon

    Hi Amin team

    execute

    plesk bin admin --enable-access-domain ''

    did not work , !!!!!!!!!!!!!!!!!!

    please advise

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello eamon

    What was the output of this command?

    Was it different from below example?

    SUCCESS: Plesk is now accessible over the TCP port 443 (HTTPS) using the domain: default.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request