nginx: "/wp-admin$" does not match x
varunchopra opened this issue · 1 comments
varunchopra commented
Codebase
Mounted codebase
Host OS
Ubuntu 18.04
Docker info output
Containers: 9
Running: 0
Paused: 0
Stopped: 9
Images: 9
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-109-generic
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 2.937GiB
Name: n0xious
ID: FZR4:GYMI:R7DP:F2RS:TY6V:S47S:MHY2:ADII:XBJA:EZOD:ZRCP:F2PX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Docker compose file
version: "3"
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
php:
image: wodby/wordpress-php:$PHP_TAG
command: "php-fpm -R"
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
volumes:
- ./wp-data:/var/www/html
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_VHOST_PRESET: wordpress
volumes:
- ./wp-data:/var/www/html
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.${PROJECT_BASE_URL}'
varnish:
image: wodby/varnish:$VARNISH_TAG
container_name: "${PROJECT_NAME}_varnish"
depends_on:
- nginx
environment:
VARNISH_SECRET: secret
VARNISH_BACKEND_HOST: nginx
VARNISH_BACKEND_PORT: 80
VARNISH_PURGE_KEY: key
VARNISH_CONFIG_PRESET: wordpress
VARNISH_PURGE_EXTERNAL_REQUEST_HEADER: X-Real-IP
labels:
- 'traefik.backend=varnish'
- 'traefik.port=6081'
- 'traefik.frontend.rule=Host:varnish.${PROJECT_BASE_URL}'
redis:
container_name: "${PROJECT_NAME}_redis"
image: wodby/redis:$REDIS_TAG
pma:
image: phpmyadmin/phpmyadmin
container_name: "${PROJECT_NAME}_pma"
environment:
PMA_HOST: $DB_HOST
PMA_USER: $DB_USER
PMA_PASSWORD: $DB_PASSWORD
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- 'traefik.backend=pma'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:pma.${PROJECT_BASE_URL}'
portainer:
image: portainer/portainer
container_name: "${PROJECT_NAME}_portainer"
command: --no-auth -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.backend=portainer'
- 'traefik.port=9000'
- 'traefik.frontend.rule=Host:portainer.${PROJECT_BASE_URL}'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: --api --docker --acme.email="gmail@gmail.com"
ports:
- '80:80'
- '443:443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
Logs output
The nginx
container logs are filled with errors like /wp-admin$ does not match x
. Is this normal behaviour? How do I go about "fixing" this?
my_wordpress_project_nginx | 2018/10/21 11:16:52 [notice] 46#46: *3 "/wp-admin$" does not match "/", client: 172.20.0.6, server: default, request: "GET /?p=9 HTTP/1.1", host: "example.com", referrer: "https://example.com/"
my_wordpress_project_nginx | 2018/10/21 11:16:52 [notice] 46#46: *3 "/wp-admin$" does not match "/index.php", client: 172.20.0.6, server: default, request: "GET /?p=9 HTTP/1.1", host: "example.com", referrer: "https://example.com/"
my_wordpress_project_php | 172.20.0.9 - 21/Oct/2018:11:16:52 +0000 "GET /index.php" 200
my_wordpress_project_nginx | 172.20.0.6 - - [21/Oct/2018:11:16:52 +0000] "GET /?p=9 HTTP/1.1" 200 6485 "https://example.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
csandanov commented
Change nginx log level, i.e. $NGINX_ERROR_LOG_LEVEL=error