So all I'm trying to do is add "client_max_body_size 5000m;" to my nginx.conf file.
I can ssh in and add the line manually, and that will work, but I know there's a way to do that automatically with my files in the .ebextensions folder.
If I use
files:
"/etc/nginx/nginx.conf":
mode: "000644"
owner: root
group: root
content: |
#Elastic Beanstalk Nginx Configuration File...
nothing seems to change.
if I use
files:
/.platform/nginx/conf.d/proxy.conf:
mode: "000644"
owner: root
group: root
content: |
#Elastic Beanstalk Nginx Configuration File...
I can see that the proxy.conf file is where I would expect it to be, but it still has no impact on my nginx settings, even though the AWS documentation and other posts on here would lead me to believe that EB should copy that file into /etc/nginx/conf.d/elasticbeanstalk/ but it does not, and manually specifying anywhere other than .platform doesn't seem to do anything. I feel like I'm close, but for the life of me I can't figure it out.
CodePudding user response:
You are trying to use (/etc/nginx/conf.d/proxy.conf
) which is for Amazon Linux 1 (AL2). It will not work in AL2 as you should be using .platform/nginx/conf.d/
, NOT .ebextentions
as shown in the docs.
Therefore, you could have the following .platform/nginx/conf.d/myconfig.conf
with content:
client_max_body_size 5000M;