From 8bbbd4cb8a5b3ce2b59921c3c9192da42167b4bd Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 5 Sep 2018 12:58:08 -0700 Subject: [PATCH] Add a short blurb about TLS + WordPress + NGINX --- wordpress/content.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wordpress/content.md b/wordpress/content.md index 759b8fa28..c8a7174bc 100644 --- a/wordpress/content.md +++ b/wordpress/content.md @@ -40,6 +40,8 @@ $ docker run --name some-%%REPO%% -e WORDPRESS_DB_HOST=10.1.2.3:3306 \ -e WORDPRESS_DB_USER=... -e WORDPRESS_DB_PASSWORD=... -d %%IMAGE%% ``` +When running WordPress with TLS behind a reverse proxy such as NGINX which is responsible for doing TLS termination, be sure to set `X-Forwarded-Proto` appropriately (see ["Using a Reverse Proxy" in "Administration Over SSL" in upstream's documentation](https://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy)). No additional environment variables or configuration should be necessary (this image automatically adds the noted `HTTP_X_FORWARDED_PROTO` code to `wp-config.php` if *any* of the above-noted environment variables are specified). + If your database requires SSL, [WordPress ticket #28625](https://core.trac.wordpress.org/ticket/28625) has the relevant details regarding support for that with WordPress upstream. As a workaround, [the "Secure DB Connection" plugin](https://wordpress.org/plugins/secure-db-connection/) can be extracted into the WordPress directory and the appropriate values described in the configuration of that plugin added in `wp-config.php`. ## Docker Secrets