0

My environment is, a docker container running wordpress on apache can be accessed via ip:port . The host environment has an apache instance which redirects traffic that comes to http://myurl to localhost:port using mod proxy (I have the same set up with other docker containers in the same host which is working fine). But accessing http://myurl (after changing the wordpress config) will just redirect you to localhost (in the wordpress container's apache log i can see it giving a 301 to redirect you) .

The problem is only there when you access the base url. (http://myurl/wp-login.php works)

Host Apache config:

<VirtualHost *:80>
    ServerName my.url.com
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass         /   http://localhost:8080/
ProxyPassReverse  /   http://localhost:8080/
</IfModule>
</VirtualHost>

This works (in wp-config.php):

define('WP_HOME','http://8.8.8.8:8080');
define('WP_SITEURL','http://8.8.8.8:8080');

This doesn't

define('WP_HOME','http://my.url.com');
define('WP_SITEURL','http://my.url.com');

These are the wordpress plugins i have enabled. But note that i changed their configs accordingly as well.

  1. wp-support-plus
  2. admin custom login

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.