<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									ZxMobile + NginX = High battery consuming - ZxMobile				            </title>
            <link>https://community.zextras.com/forum/zxmobile/zxmobile-nginx-high-battery-consuming/</link>
            <description>Zextras Community Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Thu, 10 Sep 2026 09:54:53 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>ZxMobile + NginX = High battery consuming</title>
                        <link>https://community.zextras.com/forum/zxmobile/zxmobile-nginx-high-battery-consuming/#post-773</link>
                        <pubDate>Fri, 28 Mar 2014 13:03:21 +0000</pubDate>
                        <description><![CDATA[Hello,OS : Ubuntu Server 12.04.4 LTS 64bits
Kernel : 3.2.0-60-generic
Zimbra : Release 8.0.6.GA.5922.UBUNTU12.64 UBUNTU12_64 FOSS edition
ZeXtras : 1.8.13
Apache : 2.2.22 Prefork

We u...]]></description>
                        <content:encoded><![CDATA[Hello,<br><br>OS : Ubuntu Server 12.04.4 LTS 64bits
Kernel : 3.2.0-60-generic
Zimbra : Release 8.0.6.GA.5922.UBUNTU12.64 UBUNTU12_64 FOSS edition
ZeXtras : 1.8.13
Apache : 2.2.22 Prefork</pre>

We used to have an Apache reverse proxy behind our Zimbra server and for several reasons, we had to remove it and use the Zimbra embedded NginX as reverse proxy (which should be good since it's provided by Zimbra itself).

With Apache, we had no issue with mobile phones + ActiveSync (in push mode) but as soon as we switched to NginX, all our mobile devices configured in push mode began to consume a lot of battery (about twice more than before)

With Apache (and same with NginX), our network architecture is as below :

<pre>Internet ----- a.b.c.d:443 -----&gt; RP (with SSL) ----- 127.0.0.1:7080 -----&gt; Zimbra (Jetty)</pre>

Apache configuration used to be :

<pre>ServerLimit         512
StartServers         16
MinSpareServers      16
MaxSpareServers      32
MaxClients          256
MaxRequestsPerChild  16

Listen a.b.c.d:443
Timeout 1800
UseCanonicalName Off
ServerSignature Off

KeepAlive On
KeepAliveTimeout 15
MaxKeepAliveRequests 128

ProxyTimeout 1800
ProxyPreserveHost On

SSLEngine on
SSLCACertificateFile  ca.crt
SSLCertificateFile    server.crt
SSLCertificateKeyFile server.key

RewriteEngine On
RewriteRule ^/(.*) http://localhost:7080/$1 <br></pre>



Now, NginX configuration is (which is mostly the default configuration provided by Zimbra) :

<pre>http
{
  server_tokens off;
  server_names_hash_max_size    512;
  server_names_hash_bucket_size 64;

  proxy_read_timeout 60s;
  proxy_send_timeout 60s;

  chunkin on;
  tcp_keepalive on;

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    zmauth;
  }

  server
  {
    listen                    a.b.c.d:443;
    client_max_body_size      0;
    ssl                       on;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               !SSLv2:!MD5:HIGH;
    ssl_certificate           server.chain.crt;
    ssl_certificate_key       server.key;

    location ^~ /Microsoft-Server-ActiveSync
    {
      set $mailhostport 7080;
      set $relhost $host;

      if ($mailhostport != 80)
      {
        set $relhost $host:$mailhostport;
      }

      proxy_pass          http://zimbra;
      proxy_read_timeout  3600;
      proxy_buffering     off;
      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;

      set $virtual_host $http_host;
      if ($virtual_host = '')
      {
        set $virtual_host $server_addr:$server_port;
      }

      proxy_set_header Host            $virtual_host;
      proxy_redirect http://$http_host/ https://$http_host/;
      proxy_redirect http://$relhost/ https://$http_host/;
    }
  }
}</pre>

I can't figure out why with NginX, mobile batteries are dumped that much.

I analysed network frames and I could notice a difference between Apache and NginX : NginX works in HTTP/1.0 where Apache uses HTTP/1.1 due to the "KeepAlive on" statement. I tried to turn on KeepAlive on NginX :

<pre>

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    keepalive 2048;
    zmauth;
  }



    location ^~ /Microsoft-Server-ActiveSync
    {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      keepalive_timeout 15;
</pre>

But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.

Any help would be greatly appreciated :)

Thanks
Regards<pre>OS : Ubuntu Server 12.04.4 LTS 64bits<br>Kernel : 3.2.0-60-generic<br>Zimbra : Release 8.0.6.GA.5922.UBUNTU12.64 UBUNTU12_64 FOSS edition<br>ZeXtras : 1.8.13<br>Apache : 2.2.22 Prefork</pre><br><br>We used to have an Apache reverse proxy behind our Zimbra server and for several reasons, we had to remove it and use the Zimbra embedded NginX as reverse proxy (which should be good since it's provided by Zimbra itself).<br><br>With Apache, we had no issue with mobile phones + ActiveSync (in push mode) but as soon as we switched to NginX, all our mobile devices configured in push mode began to consume a lot of battery (about twice more than before)<br><br>With Apache (and same with NginX), our network architecture is as below :<br><br>Internet ----- a.b.c.d:443 -----&gt; RP (with SSL) ----- 127.0.0.1:7080 -----&gt; Zimbra (Jetty)</pre>

Apache configuration used to be :

<pre>ServerLimit         512
StartServers         16
MinSpareServers      16
MaxSpareServers      32
MaxClients          256
MaxRequestsPerChild  16

Listen a.b.c.d:443
Timeout 1800
UseCanonicalName Off
ServerSignature Off

KeepAlive On
KeepAliveTimeout 15
MaxKeepAliveRequests 128

ProxyTimeout 1800
ProxyPreserveHost On

SSLEngine on
SSLCACertificateFile  ca.crt
SSLCertificateFile    server.crt
SSLCertificateKeyFile server.key

RewriteEngine On
RewriteRule ^/(.*) http://localhost:7080/$1 <br></pre>



Now, NginX configuration is (which is mostly the default configuration provided by Zimbra) :

<pre>http
{
  server_tokens off;
  server_names_hash_max_size    512;
  server_names_hash_bucket_size 64;

  proxy_read_timeout 60s;
  proxy_send_timeout 60s;

  chunkin on;
  tcp_keepalive on;

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    zmauth;
  }

  server
  {
    listen                    a.b.c.d:443;
    client_max_body_size      0;
    ssl                       on;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               !SSLv2:!MD5:HIGH;
    ssl_certificate           server.chain.crt;
    ssl_certificate_key       server.key;

    location ^~ /Microsoft-Server-ActiveSync
    {
      set $mailhostport 7080;
      set $relhost $host;

      if ($mailhostport != 80)
      {
        set $relhost $host:$mailhostport;
      }

      proxy_pass          http://zimbra;
      proxy_read_timeout  3600;
      proxy_buffering     off;
      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;

      set $virtual_host $http_host;
      if ($virtual_host = '')
      {
        set $virtual_host $server_addr:$server_port;
      }

      proxy_set_header Host            $virtual_host;
      proxy_redirect http://$http_host/ https://$http_host/;
      proxy_redirect http://$relhost/ https://$http_host/;
    }
  }
}</pre>

I can't figure out why with NginX, mobile batteries are dumped that much.

I analysed network frames and I could notice a difference between Apache and NginX : NginX works in HTTP/1.0 where Apache uses HTTP/1.1 due to the "KeepAlive on" statement. I tried to turn on KeepAlive on NginX :

<pre>

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    keepalive 2048;
    zmauth;
  }



    location ^~ /Microsoft-Server-ActiveSync
    {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      keepalive_timeout 15;
</pre>

But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.

Any help would be greatly appreciated :)

Thanks
Regards<pre>Internet
<hr class="bbcode_rule" />
a.b.c.d:443
<hr class="bbcode_rule" />
&gt; RP (with SSL)
<hr class="bbcode_rule" />
127.0.0.1:7080
<hr class="bbcode_rule" />
&gt; Zimbra (Jetty)</pre><br><br>Apache configuration used to be :<br><br>ServerLimit         512
StartServers         16
MinSpareServers      16
MaxSpareServers      32
MaxClients          256
MaxRequestsPerChild  16

Listen a.b.c.d:443
Timeout 1800
UseCanonicalName Off
ServerSignature Off

KeepAlive On
KeepAliveTimeout 15
MaxKeepAliveRequests 128

ProxyTimeout 1800
ProxyPreserveHost On

SSLEngine on
SSLCACertificateFile  ca.crt
SSLCertificateFile    server.crt
SSLCertificateKeyFile server.key

RewriteEngine On
RewriteRule ^/(.*) http://localhost:7080/$1 <br></pre>



Now, NginX configuration is (which is mostly the default configuration provided by Zimbra) :

<pre>http
{
  server_tokens off;
  server_names_hash_max_size    512;
  server_names_hash_bucket_size 64;

  proxy_read_timeout 60s;
  proxy_send_timeout 60s;

  chunkin on;
  tcp_keepalive on;

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    zmauth;
  }

  server
  {
    listen                    a.b.c.d:443;
    client_max_body_size      0;
    ssl                       on;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               !SSLv2:!MD5:HIGH;
    ssl_certificate           server.chain.crt;
    ssl_certificate_key       server.key;

    location ^~ /Microsoft-Server-ActiveSync
    {
      set $mailhostport 7080;
      set $relhost $host;

      if ($mailhostport != 80)
      {
        set $relhost $host:$mailhostport;
      }

      proxy_pass          http://zimbra;
      proxy_read_timeout  3600;
      proxy_buffering     off;
      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;

      set $virtual_host $http_host;
      if ($virtual_host = '')
      {
        set $virtual_host $server_addr:$server_port;
      }

      proxy_set_header Host            $virtual_host;
      proxy_redirect http://$http_host/ https://$http_host/;
      proxy_redirect http://$relhost/ https://$http_host/;
    }
  }
}</pre>

I can't figure out why with NginX, mobile batteries are dumped that much.

I analysed network frames and I could notice a difference between Apache and NginX : NginX works in HTTP/1.0 where Apache uses HTTP/1.1 due to the "KeepAlive on" statement. I tried to turn on KeepAlive on NginX :

<pre>

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    keepalive 2048;
    zmauth;
  }



    location ^~ /Microsoft-Server-ActiveSync
    {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      keepalive_timeout 15;
</pre>

But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.

Any help would be greatly appreciated :)

Thanks
Regards<pre>ServerLimit         512<br>StartServers         16<br>MinSpareServers      16<br>MaxSpareServers      32<br>MaxClients          256<br>MaxRequestsPerChild  16<br><br>Listen a.b.c.d:443<br>Timeout 1800<br>UseCanonicalName Off<br>ServerSignature Off<br><br>KeepAlive On<br>KeepAliveTimeout 15<br>MaxKeepAliveRequests 128<br><br>ProxyTimeout 1800<br>ProxyPreserveHost On<br><br>SSLEngine on<br>SSLCACertificateFile  ca.crt<br>SSLCertificateFile    server.crt<br>SSLCertificateKeyFile server.key<br><br>RewriteEngine On<br>RewriteRule ^/(.*) http://localhost:7080/$1 <br></pre><br><br><br><br>Now, NginX configuration is (which is mostly the default configuration provided by Zimbra) :<br><br>http
{
  server_tokens off;
  server_names_hash_max_size    512;
  server_names_hash_bucket_size 64;

  proxy_read_timeout 60s;
  proxy_send_timeout 60s;

  chunkin on;
  tcp_keepalive on;

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    zmauth;
  }

  server
  {
    listen                    a.b.c.d:443;
    client_max_body_size      0;
    ssl                       on;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               !SSLv2:!MD5:HIGH;
    ssl_certificate           server.chain.crt;
    ssl_certificate_key       server.key;

    location ^~ /Microsoft-Server-ActiveSync
    {
      set $mailhostport 7080;
      set $relhost $host;

      if ($mailhostport != 80)
      {
        set $relhost $host:$mailhostport;
      }

      proxy_pass          http://zimbra;
      proxy_read_timeout  3600;
      proxy_buffering     off;
      proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;

      set $virtual_host $http_host;
      if ($virtual_host = '')
      {
        set $virtual_host $server_addr:$server_port;
      }

      proxy_set_header Host            $virtual_host;
      proxy_redirect http://$http_host/ https://$http_host/;
      proxy_redirect http://$relhost/ https://$http_host/;
    }
  }
}</pre>

I can't figure out why with NginX, mobile batteries are dumped that much.

I analysed network frames and I could notice a difference between Apache and NginX : NginX works in HTTP/1.0 where Apache uses HTTP/1.1 due to the "KeepAlive on" statement. I tried to turn on KeepAlive on NginX :

<pre>

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    keepalive 2048;
    zmauth;
  }



    location ^~ /Microsoft-Server-ActiveSync
    {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      keepalive_timeout 15;
</pre>

But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.

Any help would be greatly appreciated :)

Thanks
Regards<pre>http<br>{<br>server_tokens off;<br>server_names_hash_max_size    512;<br>server_names_hash_bucket_size 64;<br><br>proxy_read_timeout 60s;<br>proxy_send_timeout 60s;<br><br>chunkin on;<br>tcp_keepalive on;<br><br>upstream zimbra<br>{<br>server    localhost:7080 fail_timeout=60s;<br>zmauth;<br>}<br><br>server<br>{<br>listen                    a.b.c.d:443;<br>client_max_body_size      0;<br>ssl                       on;<br>ssl_prefer_server_ciphers on;<br>ssl_ciphers               !SSLv2:!MD5:HIGH;<br>ssl_certificate           server.chain.crt;<br>ssl_certificate_key       server.key;<br><br>location ^~ /Microsoft-Server-ActiveSync<br>{<br>set $mailhostport 7080;<br>set $relhost $host;<br><br>if ($mailhostport != 80)<br>{<br>set $relhost $host:$mailhostport;<br>}<br><br>proxy_pass          http://zimbra;<br>proxy_read_timeout  3600;<br>proxy_buffering     off;<br>proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;<br><br>set $virtual_host $http_host;<br>if ($virtual_host = '')<br>{<br>set $virtual_host $server_addr:$server_port;<br>}<br><br>proxy_set_header Host            $virtual_host;<br>proxy_redirect http://$http_host/ https://$http_host/;<br>proxy_redirect http://$relhost/ https://$http_host/;<br>}<br>}<br>}</pre><br><br>I can't figure out why with NginX, mobile batteries are dumped that much.<br><br>I analysed network frames and I could notice a difference between Apache and NginX : NginX works in HTTP/1.0 where Apache uses HTTP/1.1 due to the "KeepAlive on" statement. I tried to turn on KeepAlive on NginX :<br><br>

  upstream zimbra
  {
    server    localhost:7080 fail_timeout=60s;
    keepalive 2048;
    zmauth;
  }



    location ^~ /Microsoft-Server-ActiveSync
    {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      keepalive_timeout 15;
</pre>

But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.

Any help would be greatly appreciated :)

Thanks
Regards<pre><br><br>upstream zimbra<br>{<br>server    localhost:7080 fail_timeout=60s;<br>keepalive 2048;<br>zmauth;<br>}<br><br><br><br>location ^~ /Microsoft-Server-ActiveSync<br>{<br>proxy_http_version 1.1;<br>proxy_set_header Connection "";<br>keepalive_timeout 15;<br></pre><br><br>But it changes nothing. I tried to turn off and on mobiles, I tried to delete and setup again accounts on mobiles, nothing works, batteries are dumped.<br><br>Any help would be greatly appreciated <img src="/smile.gif" width="" height="" alt=":)" title=":)" class="bbcode_smiley" /><br><br>Thanks<br>Regards]]></content:encoded>
						                            <category domain="https://community.zextras.com/forum/zxmobile/">ZxMobile</category>                        <dc:creator>niko</dc:creator>
                        <guid isPermaLink="true">https://community.zextras.com/forum/zxmobile/zxmobile-nginx-high-battery-consuming/#post-773</guid>
                    </item>
							        </channel>
        </rss>
		