5

I have set up NGINX as a load balancer for two Domino servers this way:

http {

    upstream www.mydomain.com {
      server 1.1.1.1;
      server 2.2.2.2 backup;
    }

    server {
        listen       80;
        server_name  www.mydomain.com;

        location / {
            proxy_pass http://www.mydomain.com;
        }
    }
}

If I access the Domino server directly the response headers are these:

HTTP/1.1 200 OK
Server: Lotus-Domino
Date: Mon, 23 Dec 2013 12:19:36 GMT
Last-Modified: Fri, 20 Dec 2013 08:16:27 GMT
Content-Type: text/html; charset=US-ASCII
Content-Length: 12713
Cache-control: private
ETag: W/"MTAtODEwRC1DMjI1N0MzRDAwN0M3NTBCLUMyMjU3QzQ3MDAyRDczMzktMC1DTj1QYW51IEhhYXJhbW8vTz1BQUQ="

When I access the same page via NGINX the response headers are these:

HTTP/1.1 200 OK
Server: nginx/1.0.15
Date: Mon, 23 Dec 2013 12:02:29 GMT
Content-Type: text/html; charset=US-ASCII
Connection: keep-alive
Last-Modified: Mon, 23 Dec 2013 12:20:47 GMT
Expires: Tue, 01 Jan 1980 06:00:00 GMT
Content-Length: 12713

Can I configure NGINX to pass the response headers exactly as I get them directly from Domino? I know I can set some of these one by one like this:

proxy_pass_header Server;

But for example ETag will not be passed even this way.

Panu Haaramo
  • 343
  • 7
  • 20

1 Answers1

2

Most probably nginx modifies a response from upstream due to enabled gzip, for instance. You could find more information here.

  • As you can see in my configuration and the response headers, gzip or other modifications are not enabled. – Panu Haaramo Jan 09 '14 at 14:44
  • 1
    I've just tested. nginx bypasses ETag with no problem. Somehow your nginx modifies a response. Did you try enabling debug mode? If your nginx is built with debug support it would be much easier to figure out. – user3120146 Jan 09 '14 at 15:03
  • Thanks for testing! I'm not familiar with debug mode but need to take a look. One problem might be the old nginx version (1.0.15). I used these instructions to make sure I get the latest version https://www.digitalocean.com/community/articles/how-to-install-nginx-on-centos-6-with-yum but looks like the instrcutions are not correct. My nginx server is now in production use and would need to setup a test server for debugging. – Panu Haaramo Jan 09 '14 at 15:19