Run Mail-in-a-Box in the same droplet as my website and API

July 9, 2018 449 views
Email Ubuntu 16.04

I have a domain registered with Godaddy called example.it
I am running a REST API and my basic html website on the same droplet.

Now I want to run our own mail server, I read the article on https://www.digitalocean.com/community/tutorials/how-to-run-your-own-mail-server-with-mail-in-a-box-on-ubuntu-14-04 but this seems to be only to run a whole droplet as a mail server (and not a subdomain).

How can I achieve this to run the Mail-in-a-box on the same droplet without problems for the API and website?

Thanks in advance for any help

2 Answers

Hello friend!

While it is technically possible to do what you are asking, I wouldn't feel comfortable giving a step by step process. I'll gladly explain. You see, applications which are intended to take over an entire server often have update processes that assume you have not made unintended modifications. My fear is that I might lead you into it, and then later your website may go down and become an emergency for you.

In this case I highly recommend running the mail-in-a-box script on it's own server, as this is more in line with what it's developers intended.

Kind Regards,
Jarland

Hello AbedNaserid,
you can put your webfiles in a predefined directory which have instructed on MIAB.
login to your MIAB admin panel then goto web which located on top menu bar.
it will show you where u can put your web files
u can also use mysql for your web project.
and also u can configure nginx for your custom need.( Link)

I personally used web within the same vps.
my experience is not good. then i leave the web on other machine.
i recommended use different vps for web.
I see the nginx file changes by MIAB automatically, so i can not rearrange the nginx as per my need.
if you have static site or no need to change nginx configure u can use the web.

Have another answer? Share your knowledge.