Allow SSL on IP / redirect to custom hostname

In the directadmin.conf be sure ssl=1 is set.
And that your hostname indeed has a valid ssl certificate.
Hi, hostname have SSL. could you reconfirm what is the best way to edit directadmin.conf? or set ssl=1, is the option available as GUI?
 

Attachments

  • SCR-20240201-rkcb.png
    SCR-20240201-rkcb.png
    187.8 KB · Views: 11
From your screenshot, the redirecthost will redirect everything to the hostname. So if a customer wants to use https://hisdomain.com:2222 then it will also be redirected to https://host.domain.com:2222 so I'm not sure if you want that.

To edit the directadmin.conf file you can either do this via SSH, or it is also available via the GUI.
In that case login as admin, go to the file editor and then from the pulldown select the directadmin.conf file as shown in this picture.
1706802690566.png\

Might look a bit different in Evo skin, but that is the way to choose it. The click "show".
After that you get the choice option to edit the file, then you need to enter a password again. Most likely you have to enter the root password there.
Then you can edit the file. But with show you can already see if the ssl=1 setting is present or not.
 
Last edited:
Thank you, however it is File Editor, not File Manager. The ssl=1 is already set. but i am still able to login via IP. i only want to use hostname.

The license is for Personal use so i have no issue with the redirection of user/reseller to hostname.
 

Attachments

  • SCR-20240201-ssmr-2.png
    SCR-20240201-ssmr-2.png
    285.3 KB · Views: 8
it is File Editor, not File Manager.
Oeps sorry. I wanted to type File Editor but for some reason (maybe hurry because wife wanted me to eat dinne) I typed Manager. I corrected it my post, thanks for pointing it out.

You can use the redirection, but it's not really needed. For example, if you visit https://yourdomain.com:2222 you can also login as admin with your admin username and admin pass. It's not required to use the hostname for logging in to DA as admin.
 
Oeps sorry. I wanted to type File Editor but for some reason (maybe hurry because wife wanted me to eat dinne) I typed Manager. I corrected it my post, thanks for pointing it out.

You can use the redirection, but it's not really needed. For example, if you visit https://yourdomain.com:2222 you can also login as admin with your admin username and admin pass. It's not required to use the hostname for logging in to DA as admin.
Totallly understand, however i no SSL enabled for IP so i thought it would be better to redirect and secure it with a single hostname login.
 
i no SSL enabled for IP
That's logical because you can't have SSL for an ip address at least not with letsencrypt, doesn't support that as far as I know because it's rarely used.
It's more secure with single hostname login yes, but most don't even use the ip address so won't login via ip. Especially not if you're the only user on the server.
However, ofcourse feel free to set the redirect option, it's there for this purpose.
 
That's logical because you can't have SSL for an ip address at least not with letsencrypt, doesn't support that as far as I know because it's rarely used.
It's more secure with single hostname login yes, but most don't even use the ip address so won't login via ip. Especially not if you're the only user on the server.
However, ofcourse feel free to set the redirect option, it's there for this purpose.
yes but neither ssl=1 or redirection seems to work.
 
The redirect is combination for the alias, but I don't know if that is the correct one.
I think this is the correct one, change or add in directadmin.conf file:
force_hostname=your.hostname.com

Don't forget to restart DA afterwards.
 
If that doesn't work, try with a .htaccess file with redirect in /var/www/html but be aware this option most likely this will also affect your webmail and phpmyadmin.
 
force_hostname=your.hostname.com worked. for ubuntu

sudo nano /usr/local/directadmin/conf/directadmin.conf

CTRL+X to exit. Y to save.
 
Back
Top