How to I setup login url domain.com/cpanel

pkwebhost

Verified User
Joined
Jul 2, 2019
Messages
36
Hello

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

domain.com/cpanel

Regards
 
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
 
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
 
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!
 
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 ?
 
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!

Hello

its work fine
Thanks
 
Last edited:
Back
Top