I originally posted this on Stack Overflow but felt it would be better here.
I've got a Wordpress docker container that isn't really responding. Trying to access it from the browser results in an empty page. No 404 or anything. Trying curl from either a computer on the network, or the server itself returns an empty response as well.
I've done a docker exec -ti container bash
into it to try and run curl from within, and it's also empty. /var/www/html
is populated, and the single entry in /etc/apache2/sites-enabled
is pointing to the /var/www/html
directory.
There are no errors in /var/log/apache2/errors
to speak of, which isn't helpful.
I've done the usual netstat -tlpn
to verify that the server is listening on the correct port, and it is. I've also changed the addresses in the wp database to localhost, to see if that was causing the issue, but that didn't change anything.
Here's my docker-compose.yml, which is very simple
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: PASSWORD
MYSQL_DATABASE: DBNAME
MYSQL_USER: USERNAME
MYSQL_PASSWORD: PASSWORD
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./upload.ini:/usr/local/etc/php/conf.d/uploads.ini
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:PORT
WORDPRESS_DB_USER: USERNAME
WORDPRESS_DB_PASSWORD: PASSWORD
WORDPRESS_DB_NAME: DBNAME
volumes:
db_data: {}
I'm at a loss as to what to check next, and am hoping to find ideas here.
I originally posted this on Stack Overflow but felt it would be better here.
I've got a Wordpress docker container that isn't really responding. Trying to access it from the browser results in an empty page. No 404 or anything. Trying curl from either a computer on the network, or the server itself returns an empty response as well.
I've done a docker exec -ti container bash
into it to try and run curl from within, and it's also empty. /var/www/html
is populated, and the single entry in /etc/apache2/sites-enabled
is pointing to the /var/www/html
directory.
There are no errors in /var/log/apache2/errors
to speak of, which isn't helpful.
I've done the usual netstat -tlpn
to verify that the server is listening on the correct port, and it is. I've also changed the addresses in the wp database to localhost, to see if that was causing the issue, but that didn't change anything.
Here's my docker-compose.yml, which is very simple
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: PASSWORD
MYSQL_DATABASE: DBNAME
MYSQL_USER: USERNAME
MYSQL_PASSWORD: PASSWORD
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./upload.ini:/usr/local/etc/php/conf.d/uploads.ini
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:PORT
WORDPRESS_DB_USER: USERNAME
WORDPRESS_DB_PASSWORD: PASSWORD
WORDPRESS_DB_NAME: DBNAME
volumes:
db_data: {}
I'm at a loss as to what to check next, and am hoping to find ideas here.
Share Improve this question asked Feb 24, 2021 at 11:17 Ross WardrupRoss Wardrup 1374 bronze badges 9 | Show 4 more comments1 Answer
Reset to default 1I believe the answer was a messed up entry in either site_url or home within the MySQL database. I changed those settings and the issue was resolved.
/var/www/html
, can you access them through browser/curl? – kero Commented Feb 24, 2021 at 11:24