I recently configured MiaB with external DNS to send and receive emails with a domain that has websites on a different server. I am able to access the box through the IP as well as box.site.com, as well as the admin panel at box.site.com/admin, but box.site.com/mail results in a 502 Bad Gateway error. This was the case when I used the MiaB to serve as the DNS provider as well. How can I gain access to my mail on the web? I am able to configure it for Outlook, though it would be easier to be able to get to it through the internet.
Where would I be able to access the error logs? I tried looking for the /mail folder, however was unable to locate it in my server. I found the nginx-alldomains.conf file in my ~/mailinabox/conf directory and see that it has a line that says
location ~ /mail/ { index index.php; alias /usr/local/lib/roundcubemail }
and see a file called index.php but the page does not load.
Hi, so what is needed is the error log from the time that an attempt is made to access /mail. I don’t see that happening in the log.
Can you run sudo tail -f /var/log/nginx/error.log in your terminal and then try to connect? Once you have done that copy the relevant part of the log. I also tried just now in case you want to look for my attempt as well. (20:22 CET)
Originally, I had websites running on there too, but I separated them into another server. I modified the php conf file to point to /var/run/php as opposed to 127.0.0.1:9000. Doing that fixed my issue. Thanks a lot! I wouldn’t have realized that if you hadn’t pointed me towards the error logs, I still relatively new to this so I’ll be more careful of that in the future.
So, this is one of the reasons that so many stress to install Mail-in-a-Box on a fresh Ubuntu 18.04 LTS server edition VPS.
In your case the fix was simple. Oftentimes they are not.
I’m still going to make the recommendation that you migrate to a VPS that meets these conditions … elsewise you are running MiaB with an Unsupported Modification.
Of course, it is your decision if you do or not … but that is the official recommendation.
But, I am glad that YOU knew how to fix the issue because it was definitely above my pay grade!