mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.

Home Page:https://mailinabox.email/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nginx recipe for running another, non-static, website on the same server

binarykitchen opened this issue · comments

I'm longing for a recipe on your excellent FAQ section on how to run your own, non-static, website on the same MiaB server.

In other words, it is possible to extend the existing MiaB nginx configuration to redirect some HTTP calls to a separate web service without the need to dockerize?

For example, MiaB would be accessible on https://pizza-business.com/cloud but any HTTP request for https://pizza-business.com itself would go to a website on the same server, e.g. running on Node.js, WordPress, whatever.

And this while guaranteeing that any future MiaB upgrades won't overwrite any Nginx configurations, breaking availability of other web services running on the same server?

Thanks heaps!

Allow me to add that I understand you would not recommend this due to stability. But I think, it is possible with advanced knowledge and careful configuration, by ensuring the other web service does not use any components MiaB relies on, except nginx.

For example, a website running on Node.js wouldn't need PHP, Dovecot, Postfix, fail2ban and so on. That said, should be fine and even an interesting solution for cutting down costs and running everything on a bare-metal server without any virtualization for best performance.