title: How to remove server header from nginx response in elastic beanstalk
body: <p>I am trying to remove the server header (<code>server: nginx/1.20.0</code>) from elastic beanstalk response. I have added <code>00_server.conf</code> to <code>.platform/nginx/conf.d/</code> in the source bundle with the following configuration</p>
  <pre><code>server {
      server_tokens off;
  }
  </code></pre>
  <p>I am expecting this would extend the Elastic Beanstalk default nginx configuration as mentioned <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html" rel="nofollow noreferrer">here</a> and at least remove the version from the server header. But this is not working.</p>
  <p>I need help with the following things:</p>
  <ol>
  <li>How do I extend the default configuration so that I can remove the server version?</li>
  <li>How do I remove the complete header?</li>
  </ol>
  <p>I have looked at the similar questions on stackoverflow but they don't seem to help.</p>
  <p><strong>Update</strong>:
  Issue 1 is resolved. <code>server_tokens</code> need to be inside the http context. Updating the above configuration to</p>
  <pre><code>server_tokens off;
  </code></pre>
  <p>fixed the problem.</p>