Results 1 to 7 of 7

Thread: How to I setup login url domain.com/cpanel

  1. #1
    Join Date
    Jul 2019
    Posts
    12

    How to I setup login url domain.com/cpanel

    Hello

    Recently I have migrate from Cpanel to Directadmin, How i setup login url like

    domain.com/cpanel

    Regards

  2. #2
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,989
    The following should do it in /etc/httpd/conf/extra/httpd-alias.conf:
    Code:
    RedirectMatch 301 ^/cpanel https://yourhostname:2222
    Alternatively, you may use webapps.list and redirect using PHP file there:
    Code:
    https://help.directadmin.com/item.php?id=599
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  3. #3
    Join Date
    Jul 2019
    Posts
    12
    Quote Originally Posted by smtalk View Post
    The following should do it in /etc/httpd/conf/extra/httpd-alias.conf:
    Code:
    RedirectMatch 301 ^/cpanel https://yourhostname:2222
    Alternatively, you may use webapps.list and redirect using PHP file there:
    Code:
    https://help.directadmin.com/item.php?id=599

    https://i.imgur.com/O8zJlmC.png

    https://i.imgur.com/mR2I51M.png

  4. #4
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,989
    Is your webserver apache? Even a simple line like this should work:
    Code:
    Redirect 301 /cpanel https://yourserver.com:2222
    Don't forget to restart apache after the changes.
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  5. #5
    Join Date
    Jul 2019
    Posts
    12
    Quote Originally Posted by smtalk View Post
    Is your webserver apache? Even a simple line like this should work:
    Code:
    Redirect 301 /cpanel https://yourserver.com:2222
    Don't forget to restart apache after the changes.
    I am using nginx_apache, after restart httpd its start working

    Thanks

  6. #6
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,989
    Yes, that's fine for nginx_apache too You're welcome. I just see you've added it not to httpd-includes.conf, it means it'd overwrite your changes with rewrite_confs command, so, you'd better place it to another file.

    Thank you!
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  7. #7
    Join Date
    Jul 2019
    Posts
    12
    Quote Originally Posted by smtalk View Post
    Yes, that's fine for nginx_apache too You're welcome. I just see you've added it not to httpd-includes.conf, it means it'd overwrite your changes with rewrite_confs command, so, you'd better place it to another file.

    Thank you!
    you mean that add same code in httpd-includes.conf ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •