apache - Cannot login with wp-cli generated user wordpress behind reverse proxy -


hello fellows have made custom wordpress image located there: https://github.com/ellakcy/wordpresswithplugins

and on entrypoint script using wp-cli in order generate custom user in order preinstall plugins. cannot login control panel generated user wp-cli.

do have idea how fix it?

the entrypoint of script following: https://github.com/ellakcy/wordpresswithplugins/blob/master/docker-entrypoint.sh

i run containers these commands: (for development purpose)

docker run --name wpdb -e mysql_root_password=1234 -d mariadb docker run --name mywordpress --link wpdb:mysql -p 8080:80 -ti wp

and using apache reverse proxy in order access wordpress running in mywordpress container:

<virtualhost *:80>  proxypass /  http://172.17.0.3/ proxypassreverse  http://172.17.0.3/ /  </virtualhost> 

(in place of 172.17.0.3 can ip of container running wordpress)

edit 1

i managed login setting network:

docker network create --subnet="172.19.0.0/16" wordpress_default

and setting custom ips coontainers. (also set enviromental variables too.)

run mysql/mariadb

docker run --name wpdb --net wordpress_default --ip 172.19.0.2 -e mysql_root_password=1234 -d mariadb

run wordpress docker enviiromental variables

docker run --name mywordpress --net wordpress_default --ip 172.19.0.3 --link wpdb:mysql -e wordpress_admin_password=1234 -e wordpress_admin_email=pc_magas@openmailbox.org -e wordpress_url=172.19.0.3 -p 8080:80 -ti wp

and visiting wordpress site via ip given oon second coommand. still have problems local apache running reverse proxy.

in end manually setting machine's ip url works charm.

docker run --name wpdb --net wordpress_default --ip 172.19.0.2 -e mysql_root_password=1234 -d mariadb run wordpress docker enviiromental variables  docker run --name mywordpress --net wordpress_default --ip 172.19.0.3 --link wpdb:mysql -e wordpress_admin_password=1234 -e wordpress_admin_email=pc_magas@openmailbox.org -e wordpress_url=172.19.0.3 -p 8080:80 -ti wp 

all had wat set following vhost apache:

<virtualhost *:80>  requestheader set x-forwarded-proto "http"  proxypass /  http://172.19.0.3/ proxypassreverse  http://172.19.0.3/ /  </virtualhost> 

(perhaps production may need changes)


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -