I'm trying to set up a local dev environment with docker and nginx. I'm new to both. I have one directory with the config files (docker-compose, nginx.conf, and dockerfile and a sub-directory with php .ini files) and a projects directory. Inside the projects directory I have a few sub-directories each one it's own small project. When I try visiting them in the browser (i.e. localhost/tests/test.php) they work. The problem is one of those directories is a WordPress site. When I try visiting that in the browser sometimes it works and sometimes I get "This site can't be reached localhost refused to connect".
I can't figure out why it sometimes works and sometimes not. I can't find anything about it in the docker logs. When it doesn't work it doesn't even seem to register the request to the url as far as I can tell.
My docker-compose files looks like this:
services:
php:
build: .
container_name: php
restart: always
volumes:
- ./projects:/var/www/html/projects
- ./php:/usr/local/etc/php/conf.d
db:
image: mariadb:latest
container_name: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: ***
MYSQL_DATABASE: brightleaf
MYSQL_USER: ***
MYSQL_PASSWORD: ***
volumes:
- db_data:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
depends_on:
- db
ports:
- "8080:80"
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: ****
UPLOAD_LIMIT: 200M
nginx:
image: nginx:latest
container_name: nginx
restart: always
depends_on:
- php
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./projects:/var/www/html/projects
ports:
- "80:80"
volumes:
db_data:
and the nginx.conf like this:
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
client_header_timeout 600s;
client_body_timeout 600s;
send_timeout 600s;
fastcgi_read_timeout 600s;
server {
listen 80;
server_name localhost;
# Root directory for all projects
root /var/www/html/projects;
# Single location block for all projects
location / {
# Serve files from the correct subdirectory
index index.php index.html;
# Try to serve the requested file, fallback to brightleaf or 404
try_files $uri $uri/ /brightleaf/index.php?$args;
# Enable directory listing if no index file is found
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600;
}
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log;
}
}
here are the nginx logs
172.19.0.1 - - [30/Jan/2025:12:40:01 +0000] "GET /brightleaf/wp-admin/update-core.php HTTP/1.1" 500 5621 "http://localhost/brightleaf/wp-admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:12:42:35 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 500 5615 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:12:44:30 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 500 5621 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:13:30:50 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
2025/01/30 13:30:50 [error] 31#31: *34 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: localhost, request: "GET /brightleaf/wp-admin/ HTTP/1.1", upstream: "fastcgi://172.19.0.2:9000", host: "localhost"
172.19.0.1 - - [30/Jan/2025:13:32:01 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 500 5621 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:13:33:28 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 500 5621 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:00:36 +0000] "GET / HTTP/1.1" 200 768 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:00:40 +0000] "GET /tests/ HTTP/1.1" 200 463 "http://localhost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:01:38 +0000] "GET /tests/tests.php HTTP/1.1" 200 11 "http://localhost/tests/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:01:47 +0000] "GET /tests/tests.php HTTP/1.1" 200 11 "http://localhost/tests/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
2025/01/30 15:02:55 [error] 31#31: *53 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: localhost, request: "GET /brightleaf/wp-admin/ HTTP/1.1", upstream: "fastcgi://172.19.0.2:9000", host: "localhost"
172.19.0.1 - - [30/Jan/2025:15:02:55 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
2025/01/30 15:04:34 [error] 31#31: *56 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: localhost, request: "GET /brightleaf/wp-admin/ HTTP/1.1", upstream: "fastcgi://172.19.0.2:9000", host: "localhost"
172.19.0.1 - - [30/Jan/2025:15:04:34 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:09:29 +0000] "GET /brightleaf/wp-admin/ HTTP/1.1" 302 242 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:14:24 +0000] "GET / HTTP/1.1" 200 768 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:14:27 +0000] "GET /info.php HTTP/1.1" 200 99487 "http://localhost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:17:18 +0000] "GET / HTTP/1.1" 200 768 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:17:30 +0000] "GET / HTTP/1.1" 200 768 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:01 +0000] "GET /brightleaf/ HTTP/1.1" 301 5 "http://localhost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:03 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:03 +0000] "GET /info.php HTTP/1.1" 200 99485 "http://localhost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:05 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 87 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:07 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:18:07 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:28:36 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:28:45 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:28:49 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 87 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:28:50 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:29:02 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 300 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:29:51 +0000] "GET /favicon.ico/ HTTP/1.1" 404 87984 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:31:53 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 43 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:32:04 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 313 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:32:20 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 42 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:15:32:20 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
172.19.0.1 - - [30/Jan/2025:16:45:41 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:45:43 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 87 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:45:45 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:45:53 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 300 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:08 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:16 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:16 +0000] "GET /favicon.ico/ HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:17 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 87 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:19 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:31 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 288 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:41 +0000] "GET /favicon.ico/ HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:44 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:48 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 87 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:49 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:57 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 300 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [30/Jan/2025:16:46:59 +0000] "GET /favicon.ico/ HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
172.19.0.1 - - [31/Jan/2025:08:06:51 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:06:53 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 85 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:06:56 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:07:03 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 300 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:08:00 +0000] "GET /favicon.ico/ HTTP/1.1" 404 87984 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:31:42 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:52:18 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 43 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [31/Jan/2025:08:52:22 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
172.19.0.1 - - [02/Feb/2025:07:59:53 +0000] "GET /hours-logger/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:07:59:55 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:07:59:55 +0000] "GET /hours-logger/scripts.js HTTP/1.1" 304 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:07:59:57 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 200 85 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:07:59:59 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:00:07 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 305 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:00:13 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 200 5 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:01:18 +0000] "GET /favicon.ico/ HTTP/1.1" 404 87992 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:46:19 +0000] "GET /hours-logger/ HTTP/1.1" 200 1085 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:46:20 +0000] "POST /hours-logger/getMincha.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
172.19.0.1 - - [02/Feb/2025:08:46:20 +0000] "POST /hours-logger/update-spreadsheets.php HTTP/1.1" 499 0 "http://localhost/hours-logger/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
and php logs
🔌34% ❯ docker logs php --follow
[30-Jan-2025 15:16:37] NOTICE: PHP message: Xdebug: [Config] The setting 'xdebug.remote_timeout' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_timeout (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[30-Jan-2025 15:16:37] NOTICE: fpm is running, pid 1
[30-Jan-2025 15:16:37] NOTICE: ready to handle connections
172.19.0.4 - 30/Jan/2025:15:17:23 +0000 "GET /brightleaf/index.php" 301
172.19.0.4 - 30/Jan/2025:15:17:28 +0000 "GET /hours-logger/index.php" 200
172.19.0.4 - 30/Jan/2025:15:17:32 +0000 "GET /info.php" 200
172.19.0.4 - 30/Jan/2025:15:18:03 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.4 - 30/Jan/2025:15:18:03 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:18:05 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:28:34 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:28:45 +0000 "GET /hours-logger/index.php" 200
172.19.0.4 - 30/Jan/2025:15:28:47 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.4 - 30/Jan/2025:15:28:47 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:28:49 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:28:47 +0000 "GET /brightleaf/index.php" 404
172.19.0.4 - 30/Jan/2025:15:31:44 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:31:53 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:32:14 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 30/Jan/2025:15:32:16 +0000 "GET /hours-logger/index.php" 200
[30-Jan-2025 16:44:40] NOTICE: PHP message: Xdebug: [Config] The setting 'xdebug.remote_timeout' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_timeout (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[30-Jan-2025 16:44:40] NOTICE: fpm is running, pid 1
[30-Jan-2025 16:44:40] NOTICE: ready to handle connections
172.19.0.2 - 30/Jan/2025:16:45:39 +0000 "GET /hours-logger/index.php" 200
172.19.0.2 - 30/Jan/2025:16:45:41 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.2 - 30/Jan/2025:16:45:42 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:45:43 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:46:01 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:46:16 +0000 "GET /hours-logger/index.php" 200
172.19.0.2 - 30/Jan/2025:16:46:16 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.2 - 30/Jan/2025:16:46:16 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:46:17 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:46:44 +0000 "GET /hours-logger/index.php" 200
[30-Jan-2025 16:46:45] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
172.19.0.2 - 30/Jan/2025:16:46:44 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.2 - 30/Jan/2025:16:46:44 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 30/Jan/2025:16:45:42 +0000 "GET /brightleaf/index.php" 404
172.19.0.2 - 30/Jan/2025:16:46:48 +0000 "POST /hours-logger/update-spreadsheets.php" 200
[31-Jan-2025 08:03:50] NOTICE: PHP message: Xdebug: [Config] The setting 'xdebug.remote_timeout' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_timeout (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[31-Jan-2025 08:03:50] NOTICE: fpm is running, pid 1
[31-Jan-2025 08:03:50] NOTICE: ready to handle connections
172.19.0.2 - 31/Jan/2025:08:06:48 +0000 "GET /hours-logger/index.php" 200
172.19.0.2 - 31/Jan/2025:08:06:51 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.2 - 31/Jan/2025:08:06:52 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 31/Jan/2025:08:06:53 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 31/Jan/2025:08:06:51 +0000 "GET /brightleaf/index.php" 404
172.19.0.2 - 31/Jan/2025:08:31:35 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 31/Jan/2025:08:52:10 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.2 - 31/Jan/2025:08:52:18 +0000 "POST /hours-logger/update-spreadsheets.php" 200
[02-Feb-2025 07:59:48] NOTICE: PHP message: Xdebug: [Config] The setting 'xdebug.remote_timeout' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_timeout (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[02-Feb-2025 07:59:48] NOTICE: fpm is running, pid 1
[02-Feb-2025 07:59:48] NOTICE: ready to handle connections
172.19.0.4 - 02/Feb/2025:07:59:52 +0000 "GET /hours-logger/index.php" 200
172.19.0.4 - 02/Feb/2025:07:59:53 +0000 "GET /hours-logger/index.php" 200
172.19.0.4 - 02/Feb/2025:07:59:55 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.4 - 02/Feb/2025:07:59:55 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 02/Feb/2025:07:59:57 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 02/Feb/2025:08:00:02 +0000 "POST /hours-logger/update-spreadsheets.php" 200
172.19.0.4 - 02/Feb/2025:07:59:55 +0000 "GET /brightleaf/index.php" 404
172.19.0.4 - 02/Feb/2025:08:46:18 +0000 "GET /hours-logger/index.php" 200
172.19.0.4 - 02/Feb/2025:08:46:19 +0000 "POST /hours-logger/getMincha.php" 200
172.19.0.4 - 02/Feb/2025:08:46:19 +0000 "POST /hours-logger/update-spreadsheets.php" 200
Turns out the wordpress site was set up to use https and I didn't have nginx configured for that. It wasn't even listening on the port for that so thats why the requests in the browser didn't usually even register. After using mkcert to generate the certificate I got it working with a setup like this
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
client_header_timeout 600s;
client_body_timeout 600s;
send_timeout 600s;
fastcgi_read_timeout 600s;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log main;
server {
listen 443 ssl;
http2 on;
server_name localhost;
ssl_certificate /certs/cert.pem;
ssl_certificate_key /certs/key.pem;
root /var/www/html/projects;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600;
}
}
server {
listen 80 default_server;
return 301 https://$host$request_uri;
}
}