Wordpress : Run Behind Reverse Proxy
Purpose
To run Wordpress from a docker container on a private subnet, while proxying public access through an Apache proxy.
Problem
Though the proxy would serve content over TLS, wordpress and the internal container would not. This would result in missing content because the java script scripts would not be allowed to run.
Fix
The following fix is readily searchable on the internet.[1] Add the following to wp-config.php to the BEGINNING of the file after <?php [2], otherwise you will get the "you do not have access to this page" error
if ( (!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) { $_SERVER['HTTPS'] = 'on'; }