After some research I see that I cannot use if directive in http context, it can only be used on "lower" levels, so in server or location. However, if together with add_header can only be used in location context. So it's not perfectly flexible for me - in this scenario I can configure my headers the way I want (see example below), but would still need to manually include the config fileby rsckp - How to...
Hi all. So far my config has looked like this: - adding some haders globally in http block - then, if necessary, adding / removing some additional headers in location blocks for certain sites (server blocks) - usually the headers added / removed are the same for all sites, ie. adding extra headers for static files (so the configuration gets repeated throughout sites) Example: http {by rsckp - How to...
That would explain it. Thank you for the information!by rsckp - Nginx Mailing List - English
Hi guys, In my configuration I'm using return directive from http_rewrite module. I'd also like to enable etag to speed things up. Sadly, so far didn't manage to get it to work. Is such configuration even possible? If I hash out "return...", etag works like a charm. server { listen 80 default_server; root /var/www/html; index index.nginx-debian.html;by rsckp - Nginx Mailing List - English