如何使用Jar文件添加zip扩展名

时间:2018-09-12 22:38:13

标签: amazon-web-services spring-boot elastic-beanstalk

我对AWS非常陌生。最近,当我将Spring Boot应用程序部署到ElasticBeanstalk Java SE平台时,发现代理超时只有60秒,我想更改它。

我这样做的方法是创建一个.ebextensions文件夹,并将我的nginx.conf放入其中,然后使用Jar文件进行压缩。但是,这没有解决,我在eb-commandprocessor日志中收到“无法启动应用程序,因为源包中没有名为application.jar或Procfile的文件。” 错误。

zip文件结构如下所示:     根/

--.ebextensions/

   --nginx/

     -- nginx.conf

--Procfile

--ROOT.jar

nginx.conf看起来像这样:

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

    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_header_timeout 60;
        client_body_timeout   1800;
        keepalive_timeout     1800;
        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/javascript;

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

我错过了什么还是做错了什么? 非常感谢有人可以帮助我!

0 个答案:

没有答案