title: Configuring nginx config files in AWS elasticbeanstalk with .ebextensions not found
body: <p>I am trying to enable https to my springboot webserver backend deployed on AWS elastic beanstalk with a self-signed SSL. I followed online tutorials and guides to change my nginx config with a new https-instance.config.</p>
  <pre><code>files:
    /etc/nginx/conf.d/myconf.conf:
      mode: &quot;conf&quot;
      owner: root
      group: root
      content: |
        # HTTPS server
  
        server {
          listen 443;
          server_name localhost;
  
          ssl on;
          ssl_certificate /etc/pki/tls/certs/server.crt;
          ssl_certificate_key /etc/pki/tls/certs/server.key;
          ssl_prefer_server_ciphers on;
  
          location / {
            proxy_pass  http://localhost:5000;
            proxy_http_version  1.1;
            proxy_set_header  Connection &quot;&quot;;
            proxy_set_header  Host  $host;
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
          }
        }
  
    /etc/pki/tls/certs/server.crt:
      mode: &quot;000400&quot;
      owner: root
      group: root
      content: |
        -----BEGIN CERTIFICATE-----
   mycert
        -----END CERTIFICATE-----
        
    /etc/pki/tls/certs/server.key:
      mode: &quot;000400&quot;
      owner: root
      group: root
      content: |
        -----BEGIN RSA PRIVATE KEY-----
  mykey
        -----END RSA PRIVATE KEY-----
  
    /opt/elasticbeanstalk/hooks/appdeploy/post/03_restart_nginx.sh:
        mode: &quot;000755&quot;
        owner: root
        group: root
        content: |
          #!/usr/bin/env bash
          sudo service nginx restart
  
  </code></pre>
  <p>When I ssh to my instance I am unable to find my myconf.conf files under conf.d. Running <code>service nginx status</code> gives me</p>
  <pre><code>● nginx.service - The nginx HTTP and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/nginx.service.d
             └─nginx.conf
     Active: active (running) since Wed 2020-08-26 03:06:34 UTC; 15min ago
    Process: 28894 ExecStartPost=/bin/sh -c systemctl show -p MainPID nginx.service | cut -d= -f2 &gt; /var/pids/nginx.pid (code=exited, status=0/SUCCESS)
    Process: 28890 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
    Process: 28887 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
    Process: 28886 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
   Main PID: 28893 (nginx)
     CGroup: /system.slice/nginx.service
             ├─28893 nginx: master process /usr/sbin/nginx
             └─28897 nginx: worker process
  
  Aug 26 03:06:34  systemd[1]: Starting The nginx HTTP and reverse proxy server...
  Aug 26 03:06:34 nginx[28887]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  Aug 26 03:06:34  nginx[28887]: nginx: configuration file /etc/nginx/nginx.conf test is successful
  Aug 26 03:06:34  systemd[1]: Started The nginx HTTP and reverse proxy server.
  </code></pre>
  <p>What am I missing out. This is my first project on AWS EBS.</p>
  <p>Note: I am running the free tier single instance for EBS</p>