I want to disable the default nginx behaviour where it adds a Server
header including the nginx version: nginx/1.18.0
. I'm fine if it just says nginx
.
From what I can find, I can do that by adding set server_tokens off;
in my nginx config file. But where do I add it?
I have a 00_application.conf
in .ebextensions/nginx/conf.d/elasticbeanstalk
, which has a location / { }
block with some config and nothing else. But the deployment fails if I add the above line, either in the block or outside it.
Googling has only resulted in "you can replace the entire elasticbeanstalk nginx config file" which seems like major overkill for something so simple.
How do I do this nicely?