Last active
May 22, 2017 14:24
-
-
Save stalmok/4157e6f32b0bb598df22f7a99e45240a to your computer and use it in GitHub Desktop.
ebs-meteor
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
files: | |
"/etc/nginx/conf.d/custom_config.conf": | |
content: | | |
server_tokens off; | |
client_max_body_size 2M; | |
"/etc/nginx/sites-available/elasticbeanstalk-nginx-docker-proxy.conf": | |
content: | | |
map $http_upgrade $connection_upgrade { | |
default "upgrade"; | |
"" ""; | |
} | |
server { | |
listen 80; | |
gzip on; | |
gzip_comp_level 4; | |
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
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; | |
# for the following to work make sure you use HTTP on port 80 on Load Balancer | |
if ($http_x_forwarded_proto = "http") { | |
return 301 https://$host$request_uri; | |
} | |
location / { | |
proxy_pass http://docker; | |
proxy_http_version 1.1; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment