Redirect to localhost
New docker comppose installl on Ubuntu 24.04 all containers starts good.
when i try to enter server ip i get redirect to localhost. docker compose loggs show:
php-1 | 172.18.0.5 - 14/Feb/2025:20:45:09 +0000 "GET /index.php" 302 php-1 | 172.18.0.5 - 14/Feb/2025:20:45:10 +0000 "GET /index.php" 302 php-1 | 127.0.0.1 - 14/Feb/2025:20:45:13 +0000 "- " 200 php-1 | 127.0.0.1 - 14/Feb/2025:20:45:18 +0000 "- " 200 php-1 | 127.0.0.1 - 14/Feb/2025:20:45:23 +0000 "- " 200 php-1 | 127.0.0.1 - 14/Feb/2025:20:45:28 +0000 "- " 200
The .env.docker have changes variable
DOCKER_WORDPRESS_URL=http://192.168.80.206
even tried with url pointed at host
Where to start now?
Would have been nice with some help here. can`t for the heck figure out why all attempt to connect redirect to localhost in browser.
Now i even tried to put the url in the .env.docker befor building the img again. but docker logs still only output:
php-1 | 127.0.0.1 - 18/Feb/2025:17:57:56 +0000 "- " 200
I have the same issue like yours, have you solved it now?
I have the same issue like yours, have you solved it now?
I have sadly abandoned the project for having this running.
simply do this:
sudo docker-compose exec wp-db mysql -uwordpress -pwordpress wordpress UPDATE wp_options SET option_value='http://yourdomain/ip' WHERE option_name='siteurl'; UPDATE wp_options SET option_value='http://yourdomain/ip' WHERE option_name='home'; UPDATE wp_site SET domain='yourdomain/ip'; UPDATE wp_blogs SET domain='yourdomain/ip' WHERE blog_id=1; UPDATE wp_sitemeta SET meta_value='http://yourdomain/ip' WHERE meta_key='siteurl'; EXIT;
then also to be sure sudo docker-compose exec php bash find /var/www/html -name wp-config.php Once you find it, search inside the domain settings home / site url and set there your domain :) that is all or you can just add in begining of config file this 2 lines: define('WP_HOME','http://yourdns/ip'); define('WP_SITEURL','http://yourdns/ip');