1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Non HTTP stuff on Elastic Beanstalk

Last updated at Posted at 2015-02-17

No, aws doesn't expose port when running docker. But it uses port information from the container to create an upstream on nginx config.

/etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf
upstream docker {
	server 172.17.0.33:24224;
	keepalive 256;
}

Then another file to do reverse-proxy

/etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf
map $http_upgrade $connection_upgrade {
	default		"upgrade";
	""			"";
}

server {
	listen 24224;

	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;
	}
}

I think we need to remove http from that proxy_pass line.

I'll post an update when it works.

PS:
Let me know if trying to run fluentd on EB is not a futile effort.

Update:
I managed to make it works!

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?