0

hey guys hope everyone is well. I created an ebxtentions file containing nginx.conf for my server because every time I update the file size from the ec2 server the updated settings don't stick because of the auto scaling group terminating and restarting my server.I was advised to create a .ebextentions folder with the config file in it which I did but it doesn't seem to work

please can someone review my config file and guide me to where I went wrong . thank you

  "/etc/nginx/nginx.conf": 
     mode: "six-digit octal value"
     owner: root
     group: root
     content: |
        #Elastic Beanstalk Nginx Configuration File

        user                    nginx;
        error_log               /var/log/nginx/error.log warn;
        pid                     /var/run/nginx.pid;
        worker_processes        auto;
        worker_rlimit_nofile    32788;

        events {
            worker_connections  1024;
        }

        http {
            include       /etc/nginx/mime.types;
            default_type  application/octet-stream;

            log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                            '$status $body_bytes_sent "$http_referer" '
                            '"$http_user_agent" "$http_x_forwarded_for"';

            include       conf.d/*.conf;

            map $http_upgrade $connection_upgrade { 
                     default     "upgrade";
            }

            server {
                listen        80 default_server;
                access_log    /var/log/nginx/access.log main;
                client_max_body_size 100M;
                client_header_timeout 60;
                client_body_timeout   60;
                keepalive_timeout     60;
                gzip                  off;
                gzip_comp_level       4;
                gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/jav$

                # Include the Elastic Beanstalk generated locations
                include conf.d/elasticbeanstalk/*.conf;
             }
            } ```

0 Answers0