<titledata-rh="true">TLS Configuration | OAuth2 Proxy</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://oauth2-proxy.github.io/oauth2-proxy/docs/7.1.x/configuration/tls"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="7.1.x"><metadata-rh="true"name="docusaurus_tag"content="docs-default-7.1.x"><metadata-rh="true"name="docsearch:version"content="7.1.x"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-default-7.1.x"><metadata-rh="true"property="og:title"content="TLS Configuration | OAuth2 Proxy"><metadata-rh="true"name="description"content="There are two recommended configurations."><metadata-rh="true"property="og:description"content="There are two recommended configurations."><linkdata-rh="true"rel="icon"href="/oauth2-proxy/img/logos/OAuth2_Proxy_icon.svg"><linkdata-rh="true"rel="canonical"href="https://oauth2-proxy.github.io/oauth2-proxy/docs/7.1.x/configuration/tls"><linkdata-rh="true"rel="alternate"href="https://oauth2-proxy.github.io/oauth2-proxy/docs/7.1.x/configuration/tls"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://oauth2-proxy.github.io/oauth2-proxy/docs/7.1.x/configuration/tls"hreflang="x-default"><linkrel="stylesheet"href="/oauth2-proxy/assets/css/styles.4014daec.css">
external load balancer like Amazon ELB or Google Platform Load Balancing) use <code>--http-address="0.0.0.0:4180"</code> or
<code>--http-address="http://:4180"</code>.</p><p>Nginx will listen on port <code>443</code> and handle SSL connections while proxying to <code>oauth2-proxy</code> on port <code>4180</code>.
<code>oauth2-proxy</code> will then authenticate requests for an upstream application. The external endpoint for this example
would be <code>https://internal.yourcompany.com/</code>.</p><p>An example Nginx config follows. Note the use of <code>Strict-Transport-Security</code> header to pin requests to SSL