1

Topic: Admin Panel not working behind NPM Reverse Proxy

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.4
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Ubuntu 24.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? n/a
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I recently setup a new iredmail server. Since i run a few servers that require web based stuff i use Nginx Reverse Proxy (NPM) for my web port proxies. During the setup process ive run into the problem of not being able to accsess the admin panel. When I go to it i get an error "502 Bad Gateway" and underneath it says "nginx". However, when i go to the mail login the roundcube pops up as normal. Inside NPM i have port forwarding of https 443 to both mail.mydomain.net and mydomain.net, with SSL certs in there (i did not do the certs with certbot since it wouldnt work for some reason). Whenever I have tried http and port 80 I get a to many ridirects error on the google side. Not sure what do to from here there is little info on this from what ive found.

Any help is appriciated.

Note: all NPM proxies have websockes and common expoit blocks on, and SSL is forced with HTTP/2 support and HSTS enabled.

Post's attachments

Screenshot 2025-07-16 184113.png 13.26 kb, file has never been downloaded. 

Screenshot 2025-07-16 184217.png
Screenshot 2025-07-16 184217.png 38.37 kb, 1 downloads since 2025-07-16 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Admin Panel not working behind NPM Reverse Proxy

To add to this, I logged in to test the server under the postmaster account and am able to send and receive email. My issue is just a proxy issue it appears

3

Re: Admin Panel not working behind NPM Reverse Proxy

Further update, I've done some more troubleshooting and have identified that the error is not with the proxy but with the iredadmin service. I am unable to access the panel at the local level with the ip address and /iredadmin or the ip with port 7791 and /iredadmin. I've attached the status of iredadmin that I ran in the command prompt with some sort of failure I don't understand. Any ideas

Anything helps!!

Note: I tried to change the port from 7791 to something else to try if that was the issue, and since changing it to that (it not working) then changing back to 7791 there's an extra line on the bottom with mail systemd.

Post's attachments

Screenshot 2025-07-17 173353.png
Screenshot 2025-07-17 173353.png 55.18 kb, file has never been downloaded. 

Screenshot 2025-07-17 174437.png 64.45 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4

Re: Admin Panel not working behind NPM Reverse Proxy

See the "socket(): permission denied" error in last message?
Not sure what you changed, but i suppose iredadmin works after iRedMail installation?

5

Re: Admin Panel not working behind NPM Reverse Proxy

ZhangHuangbin wrote:

See the "socket(): permission denied" error in last message?
Not sure what you changed, but i suppose iredadmin works after iRedMail installation?


I was never able to access the iredadmin panel at any point after install. It was a fresh install and I tried twice with the same result. I'm going to try a fresh reinstall on a new lxc.

6

Re: Admin Panel not working behind NPM Reverse Proxy

I reinstalled and am getting the same socket error. Everything else works fine. I did some more digging and seem to be having a very similar issue to these two posts: https://forum.iredmail.org/topic20529-c … rvice.html
https://forum.iredmail.org/topic20702-c … ainer.html

I just don't understand or know some of the stuff used in these and am looking for some guidance. It appears to be some sort of issue related to being an lxc container and the permissions. Not sure what to set the permissions to for this to work. I also tried to run a privileged lxc instead but i had trouble getting that started with ubutnu.