Aws Beanstalk nginx killed when tried to add new environment

前端 未结 1 1118
醉酒成梦
醉酒成梦 2021-01-25 03:48

I receive this error every time that I need to add a new environment variable from AWS EBS panel:

AWS Beanstalk events:

2018-02-16 14:49:21 UTC-0200  INF         


        
1条回答
  •  一向
    一向 (楼主)
    2021-01-25 04:16

    I had this problem as well and Amazon acknowledged the error in the documentation. This is a working restart script that you can use in your .ebextensions config file.

    /opt/elasticbeanstalk/hooks/configdeploy/post/99_kill_default_nginx.sh:
    mode: "000755"
    owner: root
    group: root
    content: |
      #!/bin/bash -xe
      rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
      status=`/sbin/status nginx`
    
      if [[ $status = *"start/running"* ]]; then
        echo "stopping nginx..."
        stop nginx
        echo "starting nginx..."
        start nginx
      else
        echo "nginx is not running... starting it..."
        start nginx
      fi
    

    0 讨论(0)
提交回复
热议问题