Charming Robot
Charming Robot

Reputation: 2660

How to change http nginx timeout in Elastic Beanstalk

I know the exact variables that I need to change in the Nginx conf file, that is: /etc/nginx/nginx.conf

And these are the fields, that I want to change:

http {
     fastcgi_read_timeout 300;
     proxy_read_timeout 300;
}

Unfortunately, I can't seem to figure out how to do it with Elastic Beanstalk.

Upvotes: 2

Views: 360

Answers (1)

Marcin
Marcin

Reputation: 238051

You can provide nginx settings using .platform as explained in the docs.

Therefore, you could have the following .platform/nginx/conf.d/myconfig.conf with content:

fastcgi_read_timeout 300;
proxy_read_timeout 300;

If this will not work, you may need to overwrite entire nginx.conf providing a custom version in .platform/nginx/nginx.conf, rather then using myconfig.conf above. To do this, ssh into your EB instance, check original nginx.conf, copy it, modify and provide a modified version as .platform/nginx/nginx.conf.

Upvotes: 3

Related Questions