Skip to content

Instantly share code, notes, and snippets.

@serg-kovalev
Last active August 16, 2018 10:04
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 serg-kovalev/810036d051c7acb9d9dc32ffb1576dd2 to your computer and use it in GitHub Desktop.
Save serg-kovalev/810036d051c7acb9d9dc32ffb1576dd2 to your computer and use it in GitHub Desktop.
Elastic Beanstalk nginx configuration tweaks
#.ebextensions/01-edit-nginx.config
container_commands:
01backup_config:
command: "cp -n /opt/elasticbeanstalk/support/conf/nginx_config.erb /opt/elasticbeanstalk/support/conf/nginx_config.erb.original"
02edit_config:
command: "sh -c \"sed '/string_to_insert_text_after/ i\
\ text_to_be_inserted;' /opt/elasticbeanstalk/support/conf/nginx_config.erb.original > /opt/elasticbeanstalk/support/conf/nginx_config.erb\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment