# Does NginxMailAuthModule support multiple http\_auth servers now

**URL:** <https://www.ruby-forum.com/t/does-nginxmailauthmodule-support-multiple-http-auth-servers-now/193472>\
**Category:** NGINX\
**Created:** [August 18, 2010, 11:51am UTC](https://www.ruby-forum.com/t/does-nginxmailauthmodule-support-multiple-http-auth-servers-now/193472 "2010-08-18T11:51:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [August 18, 2010, 11:51am UTC](https://www.ruby-forum.com/t/does-nginxmailauthmodule-support-multiple-http-auth-servers-now/193472/1 "2010-08-18T11:51:23Z")

</div>

Hey, I’m deploying my mail server and use nginx as the mail proxy. I  
tend to use multiple http\_auth servers to balance the load. Can I write  
multiple “http\_auth” directives? Or can I use a upstream block to  
indicate those servers?

Many thanks.

Posted at Nginx Forum:

> **[Does NginxMailAuthModule support multiple http\_auth servers now](https://forum.nginx.org/read.php?2,120930,120930#msg-120930)**
>
> Hey, I'm deploying my mail server and use nginx as the mail proxy. I tend to use multiple http\_auth servers to balance the load. Can I write multiple "http\_auth" directives? Or can I use a upstream block to indicate those servers? Many...

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [August 18, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/does-nginxmailauthmodule-support-multiple-http-auth-servers-now/193472/2 "2010-08-18T12:24:46Z")

</div>

Hello!

On Wed, Aug 18, 2010 at 05:50:19AM -0400, speedfirst wrote:

> Hey, I’m deploying my mail server and use nginx as the mail proxy. I  
> tend to use multiple http\_auth servers to balance the load. Can I write  
> multiple “http\_auth” directives? Or can I use a upstream block to  
> indicate those servers?

No.

Usual aproach is to configure http in the same nginx and  
proxy\_pass/fastcgi\_pass/whatever with appropriate balancing and  
redundancy, e.g.

mail {  
auth\_http 127.0.0.1:8080/mailauth;  
}

http {  
upstream auth-backends {  
server …  
server …  
}

```
server {
    listen 127.0.0.1:8080;

    location = /mailauth {
        proxy_pass http://auth-backends;
    }
}

```

}

Maxim D.
