Access DA via /cpanel

You can't.

DirectAdmin runs it's own webserver, similarly to how Webmin works.

That webserver runs on port 2222.

Well, maybe you can.

If you have the skills, try creating an ssh tunnel to your box, and access port 2222 from localhost.

(There are lots of examples of creating an ssh tunnel all over the 'net; precisely how you'd do it depends on which ssh client you use and on which computer platform you work. Google is your friend :) .)

Edit, adding text:

Of course if you want to do this for your clients you can probably forget about it. It's a lot easier to tech them to use 2222 than it is to teach them how to set up SSH on their computers.

Jeff
 
Last edited:
CPanel uses port 3306 or similiar for its control panel and maps that to cpanel, so domain.com/cpanel works, all I need is a similar thing for DA to make it easier on the clients

Ta
 
Okay... I presumed you didn't want the 2222 because your ISP blocked it.

Then it's a bit easier.

Just add a redirect for the directory name you choose (either using an .htaccess file in the main site web-directory [most likely /var/www/html], or a redirect in /etc/httpd/conf/httpd.conf) to the default DA login directory.

Jeff
 
Jeff

So far I've just added a redirect from within the DA control panel from /login to :2222 to do this

Will adding it in /etc/httpd/conf/httpd.conf) in the default DA login directory do it automatically server wide?

Thanks,

Rob
 
Take a look at what Squirrelmail and Webmail do, to make sure they work with all domains. Perhaps you can figure out how to do the same.

;)

Jeff
 
Alias /cpanel /var/www/html/

Added to .conf would work then, but any ideas on the correct local path to access DA ?
 
Hey,

Here's a way that should work to get it to work with ALL domains on the server:

(This is on RH9)

1.) Create a "/var/www/html/login" directory
2.) Create an index.php file in that directory with the following:

<?php

header("Location: http://server_hostname_here:2222");

?>

Note: Use https above if needed.

3.) In "/etc/httpd/conf/httpd.conf" change:

(Note: These changes are made in the VirtualHost container that says: "#The default site for the server.")

DocumentRoot /var/www/html

to

DocumentRoot /var/www/html/login

and then add this line:

ServerAlias login.*

4.) Create a DNS entry for "login" for the apropriate domain.

Now, you should be able to browse to:

http://login.customer_domain_here.com

and get the DA login page.

Of course, backup your httpd.conf file first.

David
 
Hey,

Yes, that's right, each domain would have to have an A record added for it to work.

David
 
Back
Top