@@ -160,11 +160,15 @@ The command line to run `oauth2_proxy` in this configuration would look like thi
160160```
161161
162162
163- 2 ) Configure SSL Termination with [ Nginx] ( http://nginx.org/ ) (example config below) or Amazon ELB, or ....
163+ 2 ) Configure SSL Termination with [ Nginx] ( http://nginx.org/ ) (example config below), Amazon ELB, Google Cloud Platform Load Balancing , or ....
164164
165- Nginx will listen on port ` 443 ` and handle SSL connections while proxying to ` oauth2_proxy ` on port ` 4180 ` .
166- ` oauth2_proxy ` which will then authenticate requests for an upstream application. The external
167- endpoint for this example would be ` https://internal.yourcompany.com/ ` .
165+ Because ` oauth2_proxy ` listens on ` 127.0.0.1:4180 ` by default, to listen on all interfaces (needed when using an
166+ external load balancer like Amazon ELB or Google Platform Load Balancing) use ` --http-address="0.0.0.0:4180" ` or
167+ ` --http-address="http://:4180" ` .
168+
169+ Nginx will listen on port ` 443 ` and handle SSL connections while proxying to ` oauth2_proxy ` on port ` 4180 ` .
170+ ` oauth2_proxy ` will then authenticate requests for an upstream application. The external endpoint for this example
171+ would be ` https://internal.yourcompany.com/ ` .
168172
169173An example Nginx config follows. Note the use of ` Strict-Transport-Security ` header to pin requests to SSL
170174via [ HSTS] ( http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security ) :
@@ -175,7 +179,7 @@ server {
175179 server_name internal.yourcompany.com;
176180 ssl_certificate /path/to/cert.pem;
177181 ssl_certificate_key /path/to/cert.key;
178- add_header Strict-Transport-Security max-age=1209600 ;
182+ add_header Strict-Transport-Security max-age=2592000 ;
179183
180184 location / {
181185 proxy_pass http://127.0.0.1:4180;
0 commit comments