Can't access via domain.com:2222

I've now moved all domains to DirectAdmin.
Hostname is srv.domain.com
domain.com is added and all DNS records correct.
Cannot access DirectAdmin via https://domain.com:2222 or https://srv.domain.com:2222

Any ideas?

What is the browser response? Did you setup a Let's Encrypt certificate or a self-signed cert? Without doing so (and without settings ssl=1) you won't be able to make an https connection.

For a self signed cert:

Code:
/usr/bin/openssl req -x509 -sha256 -newkey rsa:4096 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

cd /usr/local/directadmin
./directadmin set ssl 1 restart

I use the above when first setting up the server, I can't remember which help topic I got it from. For an LE certificate, I use the following:

 
I have Cloudflare SSL installed on the domain. The connection just hangs when visiting :2222
I'll give LE a try with those settings.
 
I have Cloudflare SSL installed on the domain. The connection just hangs when visiting :2222
I'll give LE a try with those settings.

Ah, I have no experience with Cloudflare SSL and no clue how that would integrate with DA.
 
You can paste in your own certificates when adding SSL.
 
If the domain is using Cloudflare, it may be resolving directly to a Cloudflare IP. Can you try accessing DirectAdmin using your server's IP to confirm you can access DirectAdmin at all?


Also, can you dig the srv subdomain you are using to see if it resolves to a Cloudflare IP instead of your server's IP?

You may need to 'grey' cloud the srv subdomain A record at Cloudflare so that it is routed directly to your server's IP.
 
I can access via IP.
srv.domain.com has a grey cloud, it's also my reverse DNS and wouldn't work being proxied through CloudFlare.
dig srv.domain.com confirms this.
 
I don't see port 2222 as supported by Cloudflare, yet:


Does the connection still use the Cloudflare SSL if you disable Cloudflare for the hostname (srv subdomain)? I thought that CF SSLs would only work while CF was active, but I could be mistaken.

I've seen this recommended as a workaround for this issue:

 
Ahh, I see you got it with the SSL from Let's Encrypt. Thanks for sharing your solution!
 
Yep, just gotta make sure your hostname is not proxied through CloudFlare.
 
@jayw1 is there anything in particular you're trying to achieve with domain.com:2222 instead of srv.domain.com:2222? Maybe there is another way to achieve it?
 
@jayw1 is there anything in particular you're trying to achieve with domain.com:2222 instead of srv.domain.com:2222? Maybe there is another way to achieve it?

It's just easier. Even better would be domain.com/panel or panel.domain.com
 
It's just easier. Even better would be domain.com/panel or panel.domain.com
If the hostname is not proxied via Cloudflare, there is a /config path by default for DirectAdmin (https://hostname/config redirects to port 2222). Also, you could edit this redirect how you'd like:
 
Back
Top