How to customize Plesk URL

Follow

Comments

59 comments

  • Avatar
    Martin

    @Floris Thank you - it worked!

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    @Martin Let's Encrypt extension places temporary script to .well-known/acme-challenge/ directory of the website. Therefore, in order to generate Let's Encrypt certificate for the domain, you need to generate it before applying the solution from this article. In other words, the domain should not redirect to somewhere.

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov

    @Artyom

    Hi Artyom! So currently there is no solution to use the login page (and so login to the admin panel) without entering the port and I will always be redirected if I do not enter the port in the login URL? Why this article suggests this solution if you are unable to access the admin panel through the login page without the port in the first place?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Lev Iurev

    @Jason may I know your Plesk version and directives you added.

    0
    Comment actions Permalink
  • Avatar
    Floris (Edited )

    With Plesk Onyx on Ubuntu 16.04 the config presented here produces "502 Bad gateway" errors on some pages:

     

    502 GET /smb/web/overview/id/d:2 HTTP/2.0 
    12748#0: *2655 upstream sent too big header while reading response header from upstream

     

    Adjusting buffer size seems to fix those:

     

    location / {
       proxy_pass https://myserver:8443;
       port_in_redirect off;
       proxy_buffer_size 128k;
       proxy_buffers 4 256k;
       proxy_busy_buffers_size 256k;
    }

     

     

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov

    You can configure Plesk to be opened on the address like the following (clean url):

    https://example.com

    Please read the instructions in this article to do it.

    You can also add a sub-domain like "plesk.example.com" using the same instructions.

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov (Edited )

    @Konstantin

    Thank you for your dedication. I will try to contact the support team and will let you know if I will solve the problem. I can see some comments above that I am not the only one that has this problem (see https://support.plesk.com/hc/en-us/articles/213945625/comments/115000148993 and the final response of his problem here https://support.plesk.com/hc/en-us/articles/213945625/comments/115000149133)

    0
    Comment actions Permalink
  • Avatar
    Martin

    > @Martin Let's Encrypt extension places temporary script to .well-known/acme-challenge/ directory of the website. Therefore, in order to generate Let's Encrypt certificate for the

    > domain, you need to generate it before applying the solution from this article. In other words, the domain should not redirect to somewhere.

    Isn't there a way to bypass the proxy for .well-known requests in nginx-settings as there will be renewals of the certificate?

    0
    Comment actions Permalink
  • Avatar
    Martin

    How do I secure this Domain with Let's Encrypt?
    There should be some directive fpr nginx to allow it?

    I'm getting this error (domain name changed):

    Error: Could not issue a Let's Encrypt SSL/TLS certificate for subdomain.domain.com.

    The authorization token is not available at https://subdomain.domain.com/.well-known/acme-challenge/iTqrmucehzz3t4B2YTkaklFXAO4K_qyEkrxecd_w0-Q.
    To resolve the issue, make it is possible to download the token file via the above URL.

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov (Edited )

    @Konstantin

    No. Thank you for your video but my problem begins when your video ends. As I said many times, I made the steps of the artical. Maybe my English is not clear enough and I am sorry if so. The problem is not accessing the login page without the port. The problem is loging in the admin panel after that. As I said, when I try to log in (when I enter username and psw and click the Log In button) I am allways redirected to the same login page and so I can not access the admin panel because of that. Accessing the login page without being able to log in into the admin panel after that is usless for me.

    0
    Comment actions Permalink
  • Avatar
    Heinrich Krebs

    Actually I got it fixes once I deleted all certificates until a single wildcard certificate from Let's Encrypt remained. Once I bound that to the Plesk Interface it all worked well.

    0
    Comment actions Permalink
  • Avatar
    Webmaster

    @Robert, even better since nginx conditional statements are in a rudimental state so far! Thanks!

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov

    @Floris, 

    Did you turned off php support and FastCGI support for the domain completelyl?

    0
    Comment actions Permalink
  • Avatar
    Mark Kraakman

    What could be the cause that http://hostname does not redirect to https://hostname ?

    http://hostname is displaying the Plesk default page
    https://hostname is displaying the username / password page.

    0
    Comment actions Permalink
  • Avatar
    Lev Iurev

    @Derek  Additional nginx directives option available only for Plesk Admin.

    0
    Comment actions Permalink
  • Avatar
    Christian Posch (Edited )

    I use Obsidian and followed the steps above and everthing is working so far. But the login page is now also accessible under http and does not automatically forward to https. I block the port 8443 through a firewall.

    Domain is set to 301 redirect and SSL on. On port 8443 it was working.

    How can i solve this problem?

    0
    Comment actions Permalink
  • Avatar
    Valéry Frisch

    hi,

    I try add the additional nginx directive but it's not working, this is the error message : 

    Configuration Nginx non valide : nginx: [emerg] duplicate location "/" in /data/www/system/console.valactive.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed

     

    What can i do to resolve this error?

    thanx

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov (Edited )

    @Simeon, 

    Finally I reproduced your issue. 

    The main point here is: 

    1. Host under "Plesk > Domains > example.com > Apache & nginx settings" should be the same as subcription's name.
      If subscription's name is "plesk.example.com" and the following directive is  defined in Apache&nginx directives: 

      location / {
      proxy_pass https://example.com:8443; 
      port_in_redirect off;
      }

      Then you will be redirected back yo login screen right after login. 
    2. The host should be resolvable from the sever. It is needed to perform a DNS lookup from nginx. (If you are using private domain name, please define it in /etc/hosts file)

     

    So, please make sure that host is resolvable and proxy_pass has the same domain name as domain's name and get back to us in case the issue still here. 

    I will update the article accordingly. 

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov (Edited )

    Hello, I've implemented the solution with a subdomain like "admin.mydomain.com" and it is working well but when I go to Website & Domains => Swtich to classic view => Click on a domain, I receive a "502 Bad Gateway" from nginx. But if I use it normally with my main domain and the port (https://mydomain.com:8443........) it works.

    Edit:
    Ok, I can see that you've updated the article with the solution of 502 errors adding the buffer directives.
    It worked for me too. Thank you!

    0
    Comment actions Permalink
  • Avatar
    Marat

    just in case someone is having same error like me or valery frisch:
    "Configuration Nginx non valide : nginx: [emerg] duplicate location "/" in /data/www/system/this.domain.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed"

    while "this.domain.com" is the domain where you want to enable proxy for plesk panel, you have to disable prosy and apply settings before adding "additional nginx directives" and then save configuration with additional directives again.

    0
    Comment actions Permalink
  • Avatar
    Floris (Edited )

    We would like to disallow direct access to port 8443 altogether (through iptables rules), so that legitimate users can only login through the main URL without port, and outsiders that do not know the exact hostname of our panel cannot access it.

     

    However I am experiencing the problem that Plesk still sends out e-mails that contain the URL with :8443 in it.

    I was able to change "https://<hostname>:8443" to "https://<hostname>" in most e-mail templates under "Tools and settings" -> "Notifications"

    However I cannot find the template of the e-mail that is used when resetting passwords. Am I not looking right, or does Plesk intentionally hide this?

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov

    @Konstantin, I did not understand what do you mean by:

    The last part of the link could not be hidden. 

    However it occurs on the login page only and it (last part) is grayed out in the status bar in most of modern browsers (For example Chrome and Safari). 
    So, i believe that it is not a big problem. 

    Can you clarify what do mean please (especially "The last part of the link could not be hidden")?

    Thank you

    0
    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Simeon Ivaylov Petrov,

    Hi! Konstantin mentioned about the following part of the request in a browser: login_up.php?success_redirect_url=https%3A%2F%2Fplesk.mydomain.tld%3A8443%2F

    This means that when accessing Plesk using a hostname without the port, browser redirects to Plesk login page and shows that redirection is successful.

    This behavior is expected.

     

    0
    Comment actions Permalink
  • Avatar
    Simeon Ivaylov Petrov

    @Konstantin

    Unfortunately this is not the problem. My Host under "Plesk > Domains > example.com > Apache & nginx settings" is correct and the same as the subscription name. I get redirected anyway. Here are my configurations corresponding to each steps:

    1) & 2) steps seen here: The domain name created is "admin.mydomain.com"

    3) & 4) & 5) steps seen here (done separately 1 by 1): The host under additional nginx directives is https://admin.mydomain.com:8443

    Even in this situation, I am always redirected back to the login page when I try do log in to the admin panel.

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov

    @Simeon, 

    Jason used the IP instead of domain's name. 

    As we already confirmed, it is needed to add exactly the same domain name to the additional directives as the name of subscription. 

    I have already updated the article with correspondence note. 

    Waiting for you in support.

    0
    Comment actions Permalink
  • Avatar
    Mark Anderson

    Is there a way to stop accessing the Plesk interface via IP when using a domain? I want to drop connections when someone tries to use the IP instead of the domain.

    Any ideas? Thanks

    0
    Comment actions Permalink
  • Avatar
    Lev Iurev

    @Valery check additional directives for the domain console.valactive.com, according to the error the issue is there

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Floris

    The email for password resetting is hardcoded. So, there is no template to be able to change the URL.

    However, you may suggest this feature at https://plesk.uservoice.com/forums/184549-feature-suggestions

    The top-ranked suggestions are likely to be included in the next versions of Plesk.

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    8443 is the port on which sw-cp-server (Plesk web server) is listening. It is required for working.

    -1
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request