Sign inSign up

alessmicro/wordpress-nginx

By alessmicro

Updated about 1 year ago

Image
Content management system
0

918

alessmicro/wordpress-nginx repository overview

This is a rebuild of the bitnami/wordpress-nginx container, with specific fixes not available in official bitnami image. It's based on the Dockerfile and is intended for development or testing purposes. All the environment variables are setup the same way as official Bitnami Container.

Important: These are not sutiable or allowed for production Usage. Bitnami Does have some different tags and versions available, on enterprise support, please use those for regular updates also the official drupal container from Docker is also nice, or else kindly use the Dockerfile and build your own as building is fun also.

  • If you enable 'WORDPRESS_ENABLE_MULTISITE' then you may have issues with 'Cookie not Enabled' in other than your main website. To fix these We have managed the fixes in 'WORDPRESS_ENABLE_REVERSE_PROXY' environment variable. Do enable it while installing for the first time or if you forgot it then, shell into container as root then follow the commands below.
  • This does not gurantee Hostname would be valid and can have certain HOST Header attacks anyway. Which is documented by bitnami themselves. this fix merely allows multisite enabled sites that different than actual main site , the editors or users of that subsite to login in their domain/wp-admin. mitigate the issues via whitelisted hosts or cdn or a level2 reverse proxy like apache/nginx to allow only specific host traffic to pass to the contaner.
zypper install nano ## install vi or anything that you familiar
nano /opt/bitnami/wordpress/wp-config.php

then in the wp-config.php add these

if ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
	$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
if ( ! empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) \&\& 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
	$_SERVER['HTTPS'] = 'on';
}
if ( ! defined( 'WP_CLI' ) ) {
        define( 'COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
}

then restart the container to go to vanilla container. This should fix that issue, the fpm fixes already incorporated in container. Because we are Using Nginx Here we can pass $host as 'HTTP_X_FORWARDED_HOST', and $scheme as 'HTTP_X_FORWARDED_PROTO' The Suse dockerfile will be available later.

Tag summary

Content type

Image

Digest

sha256:6be301f0a

Size

423.2 MB

Last updated

about 1 year ago

docker pull alessmicro/wordpress-nginx:6-php84-suse-arm64