I noticed all the add_header statements under the http block in nginx.conf were being displayed twice for PHP files. I guess because nginx runs through everything twice, once for the original request, a second time when sending to the PHP proxy.
Easy fix is to simply add:
add_header "" "";
Within the server 8080 block for the PHP fastcgi.
Nginx add_header is annoying in that sense. The "headers more" ngx module gives so much more flexibility, works as one would expect headers to work, and also prevents duplicate headers if you declare it multiple times. Might be something to think about adding to the build in the future.
I noticed all the add_header statements under the http block in nginx.conf were being displayed twice for PHP files. I guess because nginx runs through everything twice, once for the original request, a second time when sending to the PHP proxy.
Easy fix is to simply add:
add_header "" "";
Within the server 8080 block for the PHP fastcgi.
Nginx add_header is annoying in that sense. The "headers more" ngx module gives so much more flexibility, works as one would expect headers to work, and also prevents duplicate headers if you declare it multiple times. Might be something to think about adding to the build in the future.