User Tools

Site Tools


How To Customize the DirectAdmin Login URL

Here is yet another way that one could personalize DirectAdmin. Let's say that you have a reseller hosting company "Super Host" and would like the login to the panel for your users to be usersdomain.tld/super. The userdomain.tld will be preserved in the redirect and be whatever domain the users want to use. For example:

  • userdomain1.tld/super ⇒ userdomain1.tld:2222
  • userdomain2.tld/super ⇒ userdomain2.tld:2222
  • userdomain3.tld/super ⇒ userdomain3.tld:2222
  • userdomain4.tld/super ⇒ userdomain4.tld:2222
  • etc.,

That can be accomplished with the following steps.

  cd /usr/local/directadmin/data/templates/custom
  cp ../virtual_host2*.conf .

Add the following near the bottom of the file /usr/local/directadmin/data/templates/custom/virtual_host2.conf beneath |CUSTOM4|

  Alias /super /var/www/html/redirect.php

  echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
  /usr/local/directadmin/dataskq d
  service httpd restart

Note: that you may need to edit the file /var/www/html/redirect.php so that it uses https instead of http if you have only DirectAdmin listening only for https connections, otherwise the request will be redirected to the server IP https://ip.ip.ip.ip:2222.

control-panels/directadmin/how-to-customize-directadmin-login-url.txt · Last modified: 2020/06/01 11:02 by Karson N.