10up / wp-local-docker-v2

ARCHIVED: A simple Docker based development environment for WordPress.
MIT License
484 stars 81 forks source link

Enhance support for media proxy w/ https upstream #300

Closed aaemnnosttv closed 1 year ago

aaemnnosttv commented 2 years ago

Description of the Change

This PR fixes a potential problem when attempting to use the media proxy with an HTTPS upstream if it uses SNI.

From nginx docs:

image

More information https://www.claudiokuenzler.com/blog/1120/nginx-reverse-proxy-ssl-alert-number-40-while-ssl-handshaking-upstream

Without this added configuration, the proxied media requests will fail with an error like this which can be observed in the nginx container logs

[error] 2214955#2214955: *231 SSL_do_handshake() failed (SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream

Closes #

Alternate Designs

None

Possible Drawbacks

This change only affects new environments.

Verification Process

Checklist:

Changelog Entry

Credits

Props @

jamesmorrison commented 2 years ago

I tested this (I had the same issue); this resolves the problem with SNI SSL certificates.