nginx: Send Custom HTTP Headers

How do I send or set arbitrary HTTP headers using nginx web server? You need to use add_header directive. It sends arbitrary HTTP header when the response code is equal to 200, 204, 301, 302 or 304. You must compile nginx with NginxHttpHeadersModule. Once compiled edit nginx.conf: # vi nginx.conf …