I was using Nginx1.4.6 when I realized that I have to set gzip off;
to be able to set the ETag header with php.
After reading this post
I did an upgrade to Nginx 1.10.1 using chef. I added the repository to the apt cookbook with
apt_repository 'nginx-php' do
uri 'ppa:nginx/stable'
distribution node['lsb']['codename']
end
And then upgraded nginx with:
package 'nginx' do
action :upgrade
end
But everything seems to be same as with the older nginx version.
Only if I explicitly set gzip off;
I can set the ETag header.
Also I did not see the etag on;
directive in my nginx.conf file and setting it manually did not have any effect.
It could be that I just need to do a vagrant destroy
and vagrant provision
again - but I think I am missing something here.
UPDATE:
I got it working now after detroying the machine again and also deleting the .vagrant
folder. But I am not shure if that was the problem.
Now I can set ETag headers and the Request contains the If-None-Match
header. But my Etags get translated into weak Etags and nginx prepends a W/
before the hash. Is this the default behaviour ? and how can I set strong Etags ?
UPDATE:
Alright because of gzip on; the etag is weak ...is there no way to set a strong etag with gzip enabled ?