Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 亚马逊弹性豆茎ebextension_Amazon Web Services_Nginx_Amazon Elastic Beanstalk_Ebextensions - Fatal编程技术网

Amazon web services 亚马逊弹性豆茎ebextension

Amazon web services 亚马逊弹性豆茎ebextension,amazon-web-services,nginx,amazon-elastic-beanstalk,ebextensions,Amazon Web Services,Nginx,Amazon Elastic Beanstalk,Ebextensions,我想在Amazon Elastic Beanstalk上用ebextension配置nginx配置 会议内容如下: files: "/etc/nginx/conf.d/custom-nginx-proxy.conf" : mode: "000755" owner: "root" group: "root" content: | client_max_body_size 60M; contatiner

我想在Amazon Elastic Beanstalk上用ebextension配置nginx配置

会议内容如下:

files:
    "/etc/nginx/conf.d/custom-nginx-proxy.conf" :
        mode: "000755"
        owner: "root"
        group: "root"
        content: |
            client_max_body_size 60M;

contatiner_commands:
    reload_nginx:
        command: "sudo service nginx reload"
但总是在内容上出错

nginx:[emerg]未知指令“files:”位于/var/elasticbeanstalk/staging/nginx/conf.d/custom nginx proxy.conf:7

我把这个文件放在

ROOT.war 
   |- ROOT/
        |- .ebextensions
               |- nginx
                    |- conf.d
                         |- custom-nginx-proxy.conf
        |- Others content

您的扩展应位于.ebextensions/01 custom nginx proxy.config。另外,第二个块应该以
container\u命令开始:
,而不是
contatiner\u命令:
,并且您不需要
sudo
,因为部署已经以root用户身份运行。如果这没有帮助,请尝试在每个缩进级别使用两个空格。EB扩展是用YAML编写的,YAML对空格非常敏感


如果您仍然被卡住,请发布部署后创建的文件的内容。

您的扩展名应位于.ebextensions/01 custom nginx proxy.config。另外,第二个块应该以
container\u命令开始:
,而不是
contatiner\u命令:
,并且您不需要
sudo
,因为部署已经以root用户身份运行。如果这没有帮助,请尝试在每个缩进级别使用两个空格。EB扩展是用YAML编写的,YAML对空格非常敏感


如果你还被卡住了,请发布部署后创建的文件的内容。/var/elasticbeanstalk/staging/nginx/conf.d/custom nginx proxy.conf。

应该是01-custom-nginx-proxy.conf或01-custom-nginx-proxy.config?应该是.config-抱歉输入错误。应该是01-custom-nginx-proxy.conf或01-custom-nginx-proxy.config?应该是.config-很抱歉输入错误。