Force Directadmin to https

bjornterpstra

New member
Joined
Mar 26, 2021
Messages
3
So I've been chewing on this problem for a while now:

I've setup DirectAdmin that the IP gets (force) redirected to a subdomain of mine (e.g sub.domain.eu) but it uses HTTP, now I have created an SSL certificate on the subdomain which I use to log into DirectAdmin but I don't know how to force the HTTPS connection.

Hope any of you can help me with this problem :)

Björn.
 
I've tried your thread realcryptonight but it doesn't seem to affect the link.
but if I change the HTTPS to HTTP and remove the :2222 it goes to a forbidden page.
Does it maybe have something to do with .htaccess? since I do not have that in either the public or private_html directory
 
I've tried your thread realcryptonight but it doesn't seem to affect the link.
but if I change the HTTPS to HTTP and remove the :2222 it goes to a forbidden page.
Does it maybe have something to do with .htaccess? since I do not have that in either the public or private_html directory
You should not use that. the :2222 is to go to the panel. Without it you will just end up in a apache page that should say that apache is working properly. But since the commands in the help page requires HTTPS you will get a 403 as you said.
 
You should not use that. the :2222 is to go to the panel. Without it you will just end up in a apache page that should say that apache is working properly. But since the commands in the help page requires HTTPS you will get a 403 as you said.
But when I also use http (without :2222) it just allows it. So I am wrong I guess?
 
I've tried your thread realcryptonight but it doesn't seem to affect the link.
but if I change the HTTPS to HTTP and remove the :2222 it goes to a forbidden page.
Does it maybe have something to do with .htaccess? since I do not have that in either the public or private_html directory
I think I know what's going on. :)
By older installs of DirectAdmin it uses public_html for HTTP and private_html for HTTPS as default.
So probably one contains the website data and one does not. (But I would recommend to go to your domain settings and go to private_html settings and change it to "Use a symbolink link from private_html to public_html - allows for same data in http and https" so that HTTP and HTTPS uses the same folder. (Meaning private_html becomes a symbolic link to public_html) )
 
I think I know what's going on. :)
By older installs of DirectAdmin it uses public_html for HTTP and private_html for HTTPS as default.
So probably one contains the website data and one does not. (But I would recommend to go to your domain settings and go to private_html settings and change it to "Use a symbolink link from private_html to public_html - allows for same data in http and https" so that HTTP and HTTPS uses the same folder. (Meaning private_html becomes a symbolic link to public_html) )
If this is not it please explain in more detail what you want to do and what it does now that is incorrect to how you want it to be.
 
If this is not it please explain in more detail what you want to do and what it does now that is incorrect to how you want it to be.
Thanks for trying to help me.
So what I want to achieve is the following: https://prnt.sc/10xckd0 this is the link to a DirectAdmin panel which is owned by a friend of mine. He (well his VPS management) has set up the link in a way that the DirectAdmin link is secured with HTTPS. Mine is not, I'm just not sure how to achieve this. Sorry if I'm not completely clear in what I mean but I hope the screenshot explains it better and I'm relatively new to setting up a server like this.

Besides my VPS is completely self-managed, the VPS of my friend on the other hand
is partly self-managed, I already reached out to support but they can't help since they have no access to my VPS.

Björn
 
Thanks for trying to help me.
So what I want to achieve is the following: https://prnt.sc/10xckd0 this is the link to a DirectAdmin panel which is owned by a friend of mine. He (well his VPS management) has set up the link in a way that the DirectAdmin link is secured with HTTPS. Mine is not, I'm just not sure how to achieve this. Sorry if I'm not completely clear in what I mean but I hope the screenshot explains it better and I'm relatively new to setting up a server like this.

Besides my VPS is completely self-managed, the VPS of my friend on the other hand
is partly self-managed, I already reached out to support but they can't help since they have no access to my VPS.

Björn
Oke, now I get what you mean.

But for as far as I know this is not a default feature/setting of DirectAdmin itself. (Unless this is done by creating an SSL/Wildcard SSL that includes all the domain that the panel will be used/accessed from) So I do not know if anyone can help you here nor how your friend did it.

The way the panel works is by the fact that it is not a part of a site (Or a domain that is added by DirectAdmin for that fact.). the panel runs separated from the websites/domains. The reason it's even accessible on all domains is that it hosts all the domains that you have added on the same IP address and thus also adding all the ports to your website that are connected to that IP. (Essentially sharing it.)

But the only way a can think on how this is even possible in the first place is that the panel has a custom virtual host(s) configuration that attach the right domains to the right SSL Certificates.
 
Hello,

Custom Build > Edit Options.
Find 'redirect_host_https' and change it to 'yes' from 'no' and your hostname will be redirected to https
 
Hello,

Custom Build > Edit Options.
Find 'redirect_host_https' and change it to 'yes' from 'no' and your hostname will be redirected to https
That already done for as far as I know.
For what I understand is that he wants all his domains that are hosted in the DirectAdmin itself to access <the domain>:2222 with the SSL that belong to that domain. But please correct me if i am wrong.
 
That already done for as far as I know.
For what I understand is that he wants all his domains that are hosted in the DirectAdmin itself to access <the domain>:2222 with the SSL that belong to that domain. But please correct me if i am wrong.
My server is configured that way only.
Only domain needs to have a valid SSL certificate and DA control panel can be accessed from
I attaching a Screenshot for your reference.


Note: As far as I know, use_hostname_for_alias should be 'yes' if you want everyone to be redirected on hostname.
I have set it to 'no' so that customer can login from their own domain if they have a Valid SSL ( )
Hello,

Custom Build > Edit Options.
Find 'redirect_host_https' and change it to 'yes' from 'no' and your hostname will be redirected to https
 

Attachments

  • current.png
    current.png
    7.3 KB · Views: 8
Back
Top