mediacms
mediacms copied to clipboard
Discovered a missing config that prevents successful AWS ALB fronting
Describe the issue
502 bad gateway if you have an AWS ALB w/Azure Oauth2 SSO fronting your mediacms instance.
To Reproduce Steps to reproduce the issue:
- comment out the lets encrypt stuff from install.sh, we are going to use the ALB's ssl abilities
- create a non-localhost instance (use the dns you purchased)
- edit the nginx available site to have the host header matching the dns name
- point the ALB at nginx port 80
- you will see this error.
[error] 45757#45757: *341 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.100.3.146, server: yoursite.domain.com, request: "GET / HTTP/1.1", upstream: "uwsgi://127.0.0.1:9000", host: "yoursite.domain.com"
Expected behavior Functional AWS ALB SSL fronting port 80 mediacms site.
Screenshots N/A
Environment (please complete the following information):
- OS: Ubuntu 20.04
- Installation method: single server, with customization
- ALB w/Azure oAuth2 SSO
FIX add the buffer size increase below to... /home/mediacms.io/mediacms/deploy/local_install/uwsgi.ini
buffer-size=65535
took much searching to discover the fix. The magic was in this post... https://stackoverflow.com/questions/22697584/nginx-uwsgi-104-connection-reset-by-peer-while-reading-response-header-from-u
Wondering whether this worths to be set as the default value...