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

alias /plesk to the control panel

Discussion in 'Plesk for Linux - 8.x and Older' started by jspilon, Sep 10, 2005.

  1. jspilon

    jspilon Guest

    Hi all,

    I need help creating an alias for domains to have /plesk


    to point to the control panel, i consider doing this on https and have a redirect on http for /plesk to switch onto https

    i understand i need to modify an apache's ".conf" file to create the alias, but wonder if it needs to be a ScriptAlias...

    Can any1 help me sort that out ?
  2. jamesyeeoc

    jamesyeeoc Guest

    You would not modify the httpd.conf or httpd.include, nor do any ScriptAlias.

    Simply modify the domain's vhost.conf file:

    # Add to vhost.conf to redirect [url]http://www.domain.com/plesk[/url] to normal CP URL
    # You do not need to even create the folder or any file contents
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteMap	lowercase	int:tolower
    RewriteCond %{SERVER_PORT} ^80$
    RewriteRule ^/plesk(.*) [url]https://domain.com:8443[/url] [R,L]
    # The RewriteRule could include the [url]www.[/url] or not
    What this does is:

    1. Turn the rewrite engine on
    2. Tell the engine to lowercase everything
    3. Match if it is a request on port 80
    4. Check if the request is for /plesk and if so then Redirect it to the normal control panel URL.

    If you like having the 'www.' in the URL, then change the RewriteRule to be:
    RewriteRule ^/plesk(.*) https://www.domain.com:8443 [R,L]
  3. jspilon

    jspilon Guest

    thank you for your answer, the only problem is that i dont want the /plesk to redirect to the regular address used for the control panel, but actually to load the control panel...

    some of my customers are running restrictive firewalls in their company and cant access the control panel easily...

  4. jamesyeeoc

    jamesyeeoc Guest

    From what you originally posted, your need was not as clear...

    See the post by Cranky near the bottom of this thread:


    This one workaround, not exactly has you wanted, but I don't think you really want to try running the control panel over a non-SSL connection do you?
  5. jspilon

    jspilon Guest

    that's still not it :p

    I want https://www.domain.com/plesk to bring up control panel not... https://www.domain.com

    and i do not have a dedicated ip address for the control panel

    there is sure a way to do this... like with cpanel all domains have


    is that a little more clear?
  6. jamesyeeoc

    jamesyeeoc Guest

    Ah yes, that is so much clearer. AFAIR cPanel has their own proxy stuff already setup, so that makes it a bit easier than on Plesk servers which don't have any sort of proxy already setup.

    As Cranky posted in the other thread,
    Plesk itself does not have anything already built-in, many of us wish they did... The Iptables port redirection would need a separate IP (if I remember correctly) for the control panel.

    Of course, you could try to do it with Apache's Proxy/ProxyPass type directives in the httpd.conf / httpd.include files which may get overwritten by Plesk. I've seen posts where people have tried that in vhost.conf / vhost_ssl.conf without much success.
  7. ProfiTiger

    ProfiTiger Guest

    Can this be done for the whole server (any domain on it)? I made my server-wide modifications for apache in server-tuning.conf, this file seems not to be overwritten as often as httpd.conf....
  8. jamesyeeoc

    jamesyeeoc Guest

    Unfortunately, the sample I posted will not avoid situations where the client is behind a firewall blocking port 8443. Once the initial redirect happens, the user's browser would then revert back to needing port 8443. Really the only thing this is good for is so the clients don't have to remember the more lengthy URL with the port number and all.

    For that scenario, you would have to do a proxy of some sort (on the server or using an external proxy), or possibly port redirection on the server's firewall (would require dedicated IP for the control panel).

    With Plesk there is unfortunately no 'quick and easy' or 'click here' solution. cPanel has certain things already in place to do it, so it is easier.

    I just had a thought and will have to check it out. Using a service such as No-IP.com it may be possible to do it. I'll have to experiment when I get a chance. (Not sure if their 'free' service has the port redirect, or if it's just their paid service)
    I wasn't aware that conf file was installed by Plesk, I've never seen one of their installers or upgraders create that file nor put the Include line in the httpd.conf/include for it. I have always created my own and so I know it does not get overwritten.