Hi there!<div><br></div><div>I'm playing around with nginx and I'm running into a problem related to image uploading. I have nginx as a load balancer and java server (jetty, spring based) as the backend server. When I upload an image (JPEG) using POST method via nginx, the quality gets dropped a lot. Please take a look at the attached image. If I upload it directly to the backend server, it gets saved properly.  Am I missing anything in the conf file? I really appreciate your help. Here is my nginx.conf.</div>
<div><br></div><div><div class="im" style="background-color:rgb(255,255,255)"><div class="im"><font color="#500050" face="arial, sans-serif"><i>http {</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    include       /etc/nginx/mime.types;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>    default_type  application/octet-stream;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im">
<font color="#500050" face="arial, sans-serif"><i>    #access_log  /dev/null  main;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    access_log  /data/logs/nginx/access.log  main;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>    log_not_found off;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    sendfile        on;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>    #tcp_nopush     on;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    keepalive_timeout  65;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    client_max_body_size 10M;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br>
</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    #gzip  on;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br>
</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    include /etc/nginx/conf.d/*.conf;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    upstream backend {</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>        ip_hash;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>        server <a href="http://example.com:7070">example.com:7070</a>;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    }</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    server  {</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>      listen  80;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>      server_name <a href="http://example.com">example.com</a>;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>      location / {</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>            proxy_pass      <a href="http://backend">http://backend</a>;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>            proxy_buffering on;</i></font></div><div class="im"><i style="color:rgb(80,0,80);font-family:arial,sans-serif">      }</i></div><div class="im">
<font color="#500050" face="arial, sans-serif"><i><br></i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    }</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i><br>
</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    server {</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>        listen 80;</i></font></div><div class="im">
<font color="#500050" face="arial, sans-serif"><i>        server_name ~.*;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>        location / {</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>          access_log off;</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>          return 503;</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>        }</i></font></div><div class="im"><font color="#500050" face="arial, sans-serif"><i>    }</i></font></div>
<div class="im"><font color="#500050" face="arial, sans-serif"><i>}</i></font></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">
Thanks a lot!</div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">-Praveen</div></div></div>