Basic nginx headers
InternetFor a few months now, Clara’s and my VPS has been running nginx. Our sites are by no means high traffic, but we’ve benefited greatly from nginx’s reduced memory requirements compared to Apache. Some of the configuration still confuses me, and I doubt I’ll be as competent at it as I am with Apache for a while, but I’m learning.
To state your character set in your HTTP headers, use this in your relevant http, server or location section of your nginx.conf
:
charset UTF-8;
And to stop advertising your nginx version:
server_token off;
And if broad IE compatibility is still important, you can save yourself some invalid HTML5 meta attributes by adding this header:
add_header X-UA-Compatible 'IE=Edge';