I don’t know this scenario is supported by the Mail-In-A-Box development team. But I hope this is very much useful/helpful for the end user if it can run behind a reverse proxy scenario.
I have my setup as follows.
Router connects to the internet
All mail ports are forwarded directly to the mail-in-a-box server ip. Except http/s Port 80 and 443
Port 80 and port 443 forwarded to the Nginx reverse proxy server
I have separate server for websites. Nginx reverse proxy correctly works with the backend web server.
My requirement is to access mail-in-a-box admin and mail interface thru the reverse proxy. All other settings of mail-in-a-box seems to be working perfectly. (Ex. mta-sts.example.com)
When I did like other websites, https://box.example.com gets looped redirection which will never ends. Hope that is due to https configuration of the mail-in-a-box server.
Did anyone face such scenario and is there any luck to do this. Otherwise, we have to get dedicated IP to host mail server and another IP for web hosting.
Sounds like it’s a problem with how you’ve got your reverse proxy setup - I can’t see any reason why it can’t be made to work. I’d try pointing the proxy to your MIAB’s local IP address (not name, not external address) and see if that works.
Also, MIAB also uses nginx and it handles static sites fine. You might be able to put both on the same box. However MIAB is not really suited for running a big webserver or serving dynamic pages - too many things will clash, and will break when MIAB subsequently updates.