Skip to content

Instantly share code, notes, and snippets.

@askagirl
Forked from 480/00_nginx.config
Created January 7, 2020 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save askagirl/721c95b42bd3b371191449e2b3827ed6 to your computer and use it in GitHub Desktop.
Save askagirl/721c95b42bd3b371191449e2b3827ed6 to your computer and use it in GitHub Desktop.
자주 쓰는 ebextensions 설정
# 장시간 http 연결로 인한 끊어짐을 방지키 위해 long idle time out 허용 하기
# nginx proxy 에 셋팅 + ELB 의 idle timeout 수정
#
# https://medium.com/tomincode/extending-gateway-timeouts-with-node-js-elastic-beanstalk-applications-5cb256f08f4b
# https://cloudavail.com/2015/10/18/allowing-long-idle-timeouts-when-using-aws-elasticbeanstalk-and-docker/
# https://github.com/metabase/metabase/tree/b9533d43881090a72d97562fb112a6133cd94127/bin/aws-eb-docker
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000644"
owner: root
group: root
content: |
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
send_timeout 3600;
services:
sysvinit:
nginx:
enabled: true
files: "/etc/nginx/conf.d/proxy.conf"
ensureRunning: true
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-environment.html
option_settings:
# ec2 인스턴스에 적용될 EC2 KEY 설정
- namespace: aws:autoscaling:launchconfiguration
option_name: InstanceType
value: "t2.medium"
- option_name: EC2KeyName
value: "API.pem"
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/beanstalk-environment-configuration-advanced.html
option_settings:
# idel timeout
- namespace: aws:elb:policies
option_name: ConnectionSettingIdleTimeout
value: 3600
# *.playauto.org SSL
- namespace: aws:elb:listener:443
option_name: SSLCertificateId
value: arn:aws:acm:ap-northeast-2:7**********:certificate/d*********************
- option_name: ListenerProtocol
value: HTTPS
- option_name: InstancePort
value: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment