Solved ip to ssl hostname redirection


From my scrap book:
Code:
cd /usr/local/directadmin/conf
perl -pi -e 's/ss1=0/ssl=1/' directadmin.conf
echo "carootcert=/usr/local/directadmin/conf/carootcert.pem" >> directadmin.conf

put this in directadmin.conf

ssl_redirect_host=host.name.com
force_hostname=your.hostname.com

Code:
/etc/init.d/directadmin restart
 
From my scrap book:
The scrapbook isn't up to date anymore. I didn't know either but since 1.62.0 this is removed:
ssl_redirect_host=host.name.com

Marius pointed that out in another thread.
So I advised to put a new topic with this question, because I have the same problem and with a new topic it gets better attention then in a solved topic, because this is not solved.

You can't use force_hostname=your.hostname.com because that will redirect -all- traffic.
So with this in effect, your users can't use https://www.theirdomain.com:2222 anymore as that also will be redirected to the hostname. So that is not the setting needed.

I just tested on my own systems which also worked correctly but not anymore.
 
The scrapbook isn't up to date anymore. I didn't know either but since 1.62.0 this is removed:
Aagh last fresh DA install was some time ago so its possible :)
So with this in effect, your users can't use https://www.theirdomain.com:2222 anymore as that also will be redirected to the hostname. So that is not the setting needed.
My customers are all redirected to https://server.domain.com so they are all redirect to my server hostname instead of their domain.
Maybe that is the reason I have never noticed this change
 
Try to use http://ip:2222 and see if you are redirected now.. my servers are not redirected.
Mine redirect to the same IP but is not secure of course.
It doesnt redirect IP to domain name.


By default DA allows people to connect to any IP, domain name, subdomain, etc.. that lives on port 2222. Their browser will show whatever they type. This feature allows the admin to force a redirect to the hostname of their choice.
 
When using IP I get an certificate error, but using domainuser.com:2222 is redirecting as expected to my server hostname and DA login panel correctly
 
I got this answer from directadmin why the disabled ssl_redirect_host

The functionality was against RFC. The core of DA is being rebased and that kind of functionality is against the rules. It kind of requires patching the libs in use in order to allow sending custom stuff in plain text via SSL port. We encourage simply using the userdomain:2222 for the DA access, it's much more rememberable than IP address. With SNI included all the user valid certs get loaded to directadmin, so no ssl warning should be displayed.
 
Their browser will show whatever they type.
Yeah I know, but in the welcome message they get the ip address so it was easier if they were then automatically redirected to the hostname.

@Marius B Oke against RFC? Hmmz.. that is acceptable and makes clear as to why this had to be removed.
However, it would be nice if in this case we could do it ourselves.

Maybe via a .htaccess in /var/www/html or somewhere else? That wouldn't be against RFC's right?
If you still are in contact with them, can you ask if such option is possible (and how)?
 
I just asked them if there is another way and i will let you know as soon i get answer from them. Lately, they keep adding and deleting options, users can't get used to an interface that always changes...
 
I understand the answer, but it's not a solution or workaround, LoL. Why can't a redirect be made with .htaccess for example?
What users "should" and "do" are two different things.

And again... the welcome message sends the users the http://ip.2222 link, so we should all adjust the welcome templates then I guess.
 
I think I'm going to create a request then so all welcome templates are change by default to |hostname| or something like that so it will all go automatically.
 
If you think to create a request about that, i am really thinking to get back to cpanel because since i moved to directadmin i am having only problems with my clients because of this changes.
 
There are made some changes, but the license change is the most important, one can get used to that, the rest is not that big. Most changes are made on request of former cPanel customers even.
Going back to CP is an option, DA is cheaper but does need a bit of real admin work once a while. It's everybody's free choice as to where to go.

Anyway, for those interested I created the request anyway:
one can upvote it if one likes it.
 
The problem is not from my side.. i have no problem with changes but for example when you change in the last year 3 or 4 times the file manager theme this is not good for clients, they need a stable theme not a theme that change every week.
 
Back
Top