Created
February 9, 2018 22:30
-
-
Save hery84/effb7c4e1537684473324612f735c77b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Elastic Beanstalk Managed | |
# Elastic Beanstalk managed configuration file | |
# Some configuration of nginx can be by placing files in /etc/nginx/conf.d | |
# using Configuration Files. | |
# http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/customize-containers.html | |
# | |
# Modifications of nginx.conf can be performed using container_commands to modify the staged version | |
# located in /tmp/deployment/config/etc#nginx#nginx.conf | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream nodejs { | |
server 127.0.0.1:8081; | |
keepalive 256; | |
} | |
server { | |
listen 8080; | |
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") { | |
set $year $1; | |
set $month $2; | |
set $day $3; | |
set $hour $4; | |
} | |
access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd; | |
access_log /var/log/nginx/access.log main; | |
location / { | |
proxy_pass http://nodejs; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
} | |
gzip on; | |
gzip_comp_level 4; | |
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment