I want to add an ssl certificate for a domain hosted on my mail server.
Names changed to protect the innocent. Dashes instead of dot. Why is everything I try to do around mailinabox so hard?
static site on host: example_net
When I point a browser at example_net it refuses to connect because it is getting
a certificate for mx_elpmaxe_com
On the Control Panel->System->TLS(SSL) Certificates page I click the “Install Certificate” button next to “example.net” an CSR dialog opens. That is not what I expected or wanted. I want to get a Lets Encrypt cert.
What did I do? I installed MIAB. I wanted to have a separate mail server. My plan was to set up a webserver on another VPS at Linode. I went for MIAB because I thought it was a turnkey solution to mail.
There was no indication it was also a web server, that was going to create websites and take over managing their DNS.
Since it now seems MIAB is not suitable for the task, I am currently setting up my own mail server, and will probably be shutting down the MIAB host once it is up.
That is how MiaB is configured out of the box, yes … but that does not mean that it has to be used that way. It was created so that someone could host email AND a simple static web page. There is absolutely no reason whatsoever that it will ‘create websites and take over managing their DNS’ if you do not allow it to. As a matter of fact it can only host simple static websites, so for many it is not sufficient to be used for web hosting. Again, there is nothing saying that you have to.
It is ABSOLUTELY suitable to the task that you defined:
How possibly are you imagining that it isn’t??? It checks all of the boxes for you.
A separate mail server
Ability to set up a webserver on another VPS
A turnkey solution to mail.
I can only IMAGINE that you DO NOT understand how things work to make what you want to happen a reality. To understand these things takes a bit of reading and research on the issues you have presented which seem to be:
1- That is hosts websites … no problem, host them elsewhere.
2- That it manages DNS … no problem either set the custom A records for your websites in the custom DNS section of the admin area OR manage your DNS elsewhere such as the domain registrar or Cloudflare.
I simply do not understand your issue here as MiaB DOES EVERYTHING YOU DESIRE. You just have to understand how DNS and the internet work.
You should make sure that the configuration of example_net is in front of mx_elpmaxe_com’s in /etc/nginx/nginx.conf
Assuming the configuration of example_net is in /etc/nginx/sites-enabled/* , make sure it is in front of /etc/nginx/conf.d/*.conf, like this
If you’re running a separate webserver anyway, it seems like the easiest way to handle this is to use certbot on the webserver to handle the certificates. You’re not FORCED to use MIAB’s DNS server (AT ALL), and definitely not forced to use the basic static webserver of MIAB.
If you want to have a separate webserver, the easy task is to use the admin panel and add the domain with the A (and AAAA) record with the ip (and ip6) of your other vps. I’m doing so since years without any problem for all websites that are not static.
Another option is to use the undokumented Proxy feature of miab, but for me setting the dns records was the better solution.