2017-12-29 25 views
0

私はここ数日間、nginxのアップロード制限を増やすために苦労しています。私の理解から、私はclient_max_body_sizeを設定するebextensionsファイルが必要です。これは、ライブサーバ上のnginx.confにclient_max_body_sizeを挿入するために、nginx.confを直接上書きするなど、いくつかの設定方法を試しました。これらの方法のどれも働いていません。私は手動で各試行の直後にファイルを手動でリロードすることを確かめました。現状では、これは私の設定ファイルは、(いくつかの反復後)の時点で次のようになります。client_max_body_sizeを増やすことができません

.ebextensions/01_nginx.config

files: 
    /etc/nginx/conf.d/proxy.conf: 
    content: | 
     client_max_body_size 2G; 

、誰もが素晴らしいだろうという私を助けることができる場合。

答えて

0

拡張または上書きできます。

Elastic Beanstalkでは、あなたがあなたの設定は、あなたの質問から右に見える

を比較

Overriding 
    ~/workspace/my-app/ 
    |-- .ebextensions 
    | `-- nginx 
    |  `-- conf.d 
    |   `-- myconf.conf 

Source独自の構成で完全に拡張したり上書き するか、デフォルトのnginxの構成を提供しますドキュメントの例また、あなたがあなたのnginxの設定への正しいパスを持っている場合.ebextensionsにnginxのリロードを追加してみてください

$ eb ssh environment-name 
$ sudo service nginx configtest 
nginx: the configuration file /${LOCATION}/nginx.conf syntax is ok 
nginx: configuration file /${LOCATION}/nginx.conf test is successful 

ドク例

"/home/ec2-user/myfile2" : 
    content: | 
     # this is my file 
     # with content 

にsshingしてのnginx confの位置を確認してください。

files: 
    /etc/nginx/conf.d/proxy.conf: 
    mode: "000644" 
    owner: root 
    group: root 
    content: | 
     client_max_body_size 2G; 

commands: 
    01_reload_nginx: 
    command: "sudo service nginx reload" 

Source

Helpful blog post that runs thru most of this: "Getting to Know and Love AWS Elastic Beanstalk Configuration Files"(.ebextensions)

関連する問題