Getting multiple different domains to work with the same IP/Port AND each using its own certificate

#1
I'm a new paying customer, using your "Web Host Elite" (what it was called in the receipt), so I'm using the "lsws",

here is my version:
/usr/local/lsws/bin/lshttpd -v
LiteSpeed/6.3.3 Enterprise

...and I'm using LiteSpeed to host a RoundCube webmail implementation. I've just spent about 6 hours (and using two different AI's for assistance, claude.ai and Grok), trying to setup my RoundCube so that multiple domains can have certificates which are all hosted at the same domain and port number. I've tried all various things - but I cannot figure out how to get this done. Both AI's kept trying different things and none could get this to work. All of the most successful implementations that got close to working, ended up with the SAME certificate being (mistakenly!) used for both of the two domains (the main one, and the second I'm trying to add - as my first attempt to have multiple ones work).

Also both certificates are definately working correctly as evidenced by the fact that when each of the two domains was working by itself, the certificate for that domain, that was using the correct certificate for that particular domain at that time, was 100% working - just not both working at the same time. It could never get both domains working at the same time AND with each using its own certificate.

Any suggestions for links to specific instructions - are very appreciated.
 
Last edited:
#2
UPDATE - SOLVED!!!! I figured it out - there were 3 main issues (and so I've learned some valuable lessons!):

(1) The use of AI in general often let to modifying config files directly - and this combined with me being logged in as "root" - often caused the permissions to be changed to a situation where LiteSpeeds' WebAdmin was unable to modify its own files. So I had the AI create a script that reset all permissions for all relevant directories and files - to a state where RoundCube could edit those. So when this issue was happening, I would change a setting in LiteSpeed, hit "save", and it would appear to have saved successfully but then when I returned to that page - the setting was just GONE! I'm not sure if there as an error in the log, but it would also be good if LiteSpeed had on on-page error showing that it was unable to save the settings due to a permissions error. That would have helped, even if LiteSpeed isn't the root cause of this issue. So now I run that permissions script after every manual mod I do to any of these configuration files.

(2) Similarly, one of the AI's I was working with had the dumb idea of using a shared/identical Config File for ALL Virtual Hosts, stupidly thinking that they would all have the same settings, and where it thought that would simplified the setup. But it failed to understand that (at the least!) they would each need to reference their own security certificate! So that lead me to a "descent into madness" - where hours were wasted where I wouldn't figure out why so many things kept failing. Every time I changed a security certificate for one - they'd magically ALL switch that that certificate - even if they were other domains/hostnames! So then figuring that out and separating these VH's into having their own separate config files - as they should have been all along - that solved many problems!

(3) Really, I should have studied the instructions first and relied more on that and less on A.I. Not saying that using AI was totally a mistake, but it can often backfire when doing something complex and having very little idea about how to do it, considering that all the various AI engines still make a lot of dumb mistakes. I've learned my lesson!

Hopefully others will learn from this too!
 
Top