title: How to configure .ebextensions for nginx location directive?
body: <p>I want to configure my staging environment in Elastic Beanstalk to always disallow all spiders. The nginx directive would look like this:</p>
  
  <pre><code>location /robots.txt {
      return 200 "User-agent: *\nDisallow: /";
  }
  </code></pre>
  
  <p>I understand that I would want to create a file under the .ebextensions/ folder, such as 01_nginx.config, but I'm not sure how to structure the YAML inside it such that it would work. My goal is to add this location directive to existing configuration, not have to fully replace any existing configuration files which are in place.</p>