cytopia / devilbox

A modern Docker LAMP stack and MEAN stack for local development
http://devilbox.org
MIT License
4.4k stars 653 forks source link

[Bug]: Devilbox and its services randomly become inaccessible from Windows 11, but still work within WSL2/Ubuntu/Docker #954

Closed nickchomey closed 1 year ago

nickchomey commented 1 year ago

Have you already looked into this bug?

(Optional) Error message

No response

What went wrong?

Suddenly Devilbox keeps sporadically breaking. I do docker compose up, browse the wordpress site, and eventually everything just breaks. I can't connect to MySQL or Redis remotely (using HeidiSQL and Redis Insight). http://127.0.0.1 doesn't work either, but http://localhost does, and all services seem fine. If I go to localhost/vhosts.php, it shows my vhost, but says No Host DNS record found. Add the following to /etc/hosts: 127.0.0.1 site.loc.

If I stop all docker containers and restart them, it works again immediately.

So, it seems like there's some DNS issue, probably related to docker and/or WSL2. I don't see anything in any logs that would suggest a problem, but it is entirely possible that I'm not looking in the right place.

Expected behaviour

I expect this not to happen.

How can we reproduce the bug?

No idea.

Host Operating System

Ubuntu 22.04 via WSL2

Host Platform (amd64, arm64, other)

amd64

(Linux only) Is SELinux enabled?

No

Docker version

Docker version 20.10.23, build 7155243

Docker Compose version

Docker Compose version v2.15.1

Devilbox version

Devilbox v3.0.0-beta-0.3 10b20c0

Have you removed stopped containers before starting?

Yes

Have you pulled latest Docker images before starting?

Yes

Devilbox start command

docker compose up bind php httpd mysql

Config: .env file

###
###  ---------------------------------------------------
###  D E V I L B O X   R U N - T I M E   S E T T I N G S
###  ---------------------------------------------------
###
###  All the following settings are applied during
###  $ docker-compose up
###
###  No need to rebuild any docker images!
###
###  IMPORTANT:
###  ----------
###  When changing any values ensure to stop, rm and restart:
###  $ docker-compose stop
###  $ docker-compose rm -f
###  $ docker-compose up
###
###  NOTE:
###  -----
###  For you own custom variables, scroll to the bottom
###

# The following line will disable any shellcheck warnings throughout this file
# shellcheck disable=SC2034,SC2125

###
### Show all executed commands in each
### docker image during docker-compose up?
###
### 0: Errors
### 1: Errors, Warnings
### 2: Errors, Warnings, Infos  (Recommended)
### 3: Errors, Warnings, Infos, Debug
### 4: Errors, Warnings, Infos, Debug, Trace
DEBUG_ENTRYPOINT=4

###
### Log to file or Docker logs.
###
### Logging to file means log files are available under log/
### on your host operating system.
### Logging to Docker logs means log files are streamed to
### stdout and stderr.
###
### 1: Log to Docker logs
### 0: Log to file
###
DOCKER_LOGS=1

###
### Relative or absolute path to the devilbox repository.
### (Used as a prefix for all mount paths)
### There is no need to change this.
###
### The only exception is for OSX users wanting to use NFS
### mounts instead of Filesystem mounts due to degraded performance
### on OSX.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
DEVILBOX_PATH=.

###
### At what IP address should the docker services listen
### on the Host computer?
###
### The specified default should be fine for Linux and OSX (127.0.0.1:).
### If you are on windows, you will probably have to change
### it to the IP address of the docker machine.
###
### a.) Leave blank, to listen on all interfaces (no trailing colon ':')
###    LOCAL_LISTEN_ADDR=
### b.) If an IP is specified, note the trailing colon ':'
###    LOCAL_LISTEN_ADDR=127.0.0.1:
###
LOCAL_LISTEN_ADDR=

###
### This is the domain suffix your projects will be made available
### with mass-virtual-hosting.
### It is also required for the internal DNS server to be setup.
###
### Note: In addition to period or dot character ('.'), only ALPHA ([a-zA-Z]+) characters are supported.
###       Mac users should not use the .local TLD, as this will not resolve properly due Apple's
###       use of Multicast DNS.
###
### Note: If you use 'dvl.to' then there is no need for additional DNS as this always points
###       to 127.0.0.1 by default.
###
### Example:
###   TLD_SUFFIX=loc
### Makes your project available under <project>.loc
###
### Example:
###   TLD_SUFFIX=local
### Makes your project available under <project>.local
###
TLD_SUFFIX=loc

###
### Optional DNS configuration
### Allows you to add extra DNS records (above the wildcard entry)
### Useful if your host computer run other Docker services that you want to connect to or reach
### from within the Devilbox network by a custom hostname.
###
### Format:
### -------
### Resolve any custom defined hostname to an IP address (useable inside container and host os)
###     EXTRA_HOSTS=<hostname>=<ip>[,<hostname>=<ip>]
###
### Resolve any custom defined hostname to whatever IP address a CNAME resolves to
### (Useable inside the container and host OS).
### Note: CNAME must be resolvable by Google DNS
###     EXTRA_HOSTS=<hostname>=<CNAME>[,<hostname>=<CNAME>]
###
### Examples:
### ---------
### EXTRA_HOSTS=hostname.loc=1.2.3.4
### EXTRA_HOSTS=host.loc=1.2.3.4,host.example.org=3.4.5.6
EXTRA_HOSTS=

###
### Set your user id and group id
###
### This should be changed to the value of your local
### users uid and gid
###
### Type `id` on the terminal to find out your values
###
NEW_UID=1000
NEW_GID=1000

###
### Timezone for PHP Docker container (system and php.ini)
###
TIMEZONE=UTC

################################################################################
###
### INTRANET SETTINGS
###
################################################################################

###
### TLD_SUFFIX domains are checked if they are set in the
### host computer /etc/hosts or available via attached DNS server.
### Timeout is done on vhosts.php (intranet) via ajax calls.
### In order to keep performance, set this to a low value.
### DNS checks might not succeed in time on slow machines.
### If DNS is valid, but timeout is expired, set this to a higher value.
###
### DNS_CHECK_TIMEOUT value is how many seconds to time out
### Default is to timeout after 1 second (DNS_CHECK_TIMEOUT=1)
###
DNS_CHECK_TIMEOUT=1

###
### Devilbox UI SSL Certificate generation
###
### When using SSL each certificate requires names for which it is responsible:
### Common Name as well as alternative names.
###
### Specify comma separated hostnames below by which you want to access the Devilbox.
### Those hostnames will be included in the SSL certificate for the Devilbox intranet.
### This has nothing to do for SSL certificates for projects, it is just for the intranet
### itself.
###
DEVILBOX_UI_SSL_CN=localhost,*.localhost,devilbox,*.devilbox,httpd

###
### Devilbox UI Password protection enable/disable (1/0)
###
### Set DEVILBOX_UI_PROTECT to 1 in order to password protect the
### intranet.
###
### Example:
###   DEVILBOX_UI_PROTECT=1
###   DEVILBOX_UI_PROTECT=0
###
DEVILBOX_UI_PROTECT=0

###
### Devilbox UI Password
###
### When DEVILBOX_UI_PROTECT=1, use the following password
### to log in. The password can always be changed.
### When changing the password, make sure to restart your
### PHP container.
###
### Example:
###   DEVILBOX_UI_PASSWORD=my-very-secure-password
###   DEVILBOX_UI_PASSWORD=Some pass with spaces
###
### The default username is 'devilbox'
###
DEVILBOX_UI_PASSWORD=password

###
### Enable the Devilbox Intranet?
###
### Example:
###   DEVILBOX_UI_ENABLE=1
###   DEVILBOX_UI_ENABLE=0
###
DEVILBOX_UI_ENABLE=1

###
### Automatically be logged in into phpMyAdmin
###
### Example:
###   DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1
###   DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=0
###
DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1

###
### Automatically be logged in into phpPgAdmin
###
### Example:
###   DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1
###   DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=0
###
DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1

###
### HTTPD Supvervisord management
###
DEVILBOX_HTTPD_MGMT_USER=supervisord
DEVILBOX_HTTPD_MGMT_PASS=mypassword

################################################################################
###
### 1. Choose Images (Version)
###
################################################################################

###
### You can choose any combination of httpd, mysql, postgresql or php.
### Each of them are fully compatible between one another.
###

###
### 1.1 Choose PHP Server Image
###
### Note: PHP 5.2 is not officially supported. Intranet won't work (due to lack of namespace support).
###       PHP 5.2 only works with Apache 2.4, Nginx stable and Nginx mainline.
###       Use at your own risk.
###
#PHP_SERVER=5.2
#PHP_SERVER=5.3
#PHP_SERVER=5.4
#PHP_SERVER=5.5
#PHP_SERVER=5.6
#PHP_SERVER=7.0
#PHP_SERVER=7.1
#PHP_SERVER=7.2
#PHP_SERVER=7.3
#PHP_SERVER=7.4
#PHP_SERVER=8.0
PHP_SERVER=8.1
#PHP_SERVER=8.2

###
### 1.2 Choose HTTPD Server Image
###
### Choose between 'debian' or 'alpine' flavour and then select the version
###
### Note: apache-2.2 has no arm64 support on 'alpine' flavour
###
HTTPD_FLAVOUR=alpine

#HTTPD_SERVER=apache-2.2
#HTTPD_SERVER=apache-2.4
HTTPD_SERVER=nginx-stable
#HTTPD_SERVER=nginx-mainline

###
### 1.3 Choose MySQL Server Image
###
#MYSQL_SERVER=mysql-5.5
#MYSQL_SERVER=mysql-5.6
#MYSQL_SERVER=mysql-5.7
#MYSQL_SERVER=mysql-8.0
#MYSQL_SERVER=percona-5.5
#MYSQL_SERVER=percona-5.6
#MYSQL_SERVER=percona-5.7
#MYSQL_SERVER=percona-8.0
#MYSQL_SERVER=mariadb-5.5
#MYSQL_SERVER=mariadb-10.0
#MYSQL_SERVER=mariadb-10.1
#MYSQL_SERVER=mariadb-10.2
#MYSQL_SERVER=mariadb-10.3
#MYSQL_SERVER=mariadb-10.4
#MYSQL_SERVER=mariadb-10.5
MYSQL_SERVER=mariadb-10.6
#MYSQL_SERVER=mariadb-10.7
#MYSQL_SERVER=mariadb-10.8
#MYSQL_SERVER=mariadb-10.9
#MYSQL_SERVER=mariadb-10.10

###
### 1.4 Choose PostgreSQL Server Image
###
### https://www.postgresql.org/support/versioning/
###
### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX
###            https://github.com/docker/toolbox/issues/510
###
#
# PostgreSQL without arm64 support
#
#PGSQL_SERVER=9.0
#PGSQL_SERVER=9.1
#PGSQL_SERVER=9.2-alpine
#
# PostgreSQL with arm64 support
#
#PGSQL_SERVER=9.2
#PGSQL_SERVER=9.3
#PGSQL_SERVER=9.3-alpine
#PGSQL_SERVER=9.4
#PGSQL_SERVER=9.4-alpine
#PGSQL_SERVER=9.5
#PGSQL_SERVER=9.5-alpine
#PGSQL_SERVER=9.6
#PGSQL_SERVER=9.6-alpine
#PGSQL_SERVER=10
#PGSQL_SERVER=10-alpine
#PGSQL_SERVER=11
#PGSQL_SERVER=11-alpine
#PGSQL_SERVER=12
#PGSQL_SERVER=12-alpine
#PGSQL_SERVER=13
#PGSQL_SERVER=13-alpine
#PGSQL_SERVER=14
PGSQL_SERVER=14-alpine
#PGSQL_SERVER=15
#PGSQL_SERVER=15-alpine
#PGSQL_SERVER=latest
#PGSQL_SERVER=alpine

###
### 1.5 Choose Redis Server Image
###
### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX
###            https://github.com/docker/toolbox/issues/510
###
#
# Redis without arm64 support
#
#REDIS_SERVER=2.8
#REDIS_SERVER=3.0
#REDIS_SERVER=3.0-alpine
#
# Redis with arm64 support
#
#REDIS_SERVER=3.2
#REDIS_SERVER=3.2-alpine
#REDIS_SERVER=4.0
#REDIS_SERVER=4.0-alpine
#REDIS_SERVER=5.0
#REDIS_SERVER=5.0-alpine
#REDIS_SERVER=6.0
#REDIS_SERVER=6.0-alpine
#REDIS_SERVER=6.2
REDIS_SERVER=6.2-alpine
#REDIS_SERVER=7.0
#REDIS_SERVER=7.0-alpine
#REDIS_SERVER=latest
#REDIS_SERVER=alpine

###
### 1.6 Choose Memcached Server Image
###
### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX
###            https://github.com/docker/toolbox/issues/510
###
#
# Memcached without arm64 support
#
#MEMCD_SERVER=1.4
#MEMCD_SERVER=1.4-alpine
#
# Memcached with arm64 support
#
#MEMCD_SERVER=1.5
#MEMCD_SERVER=1.5-alpine
#MEMCD_SERVER=1.6
MEMCD_SERVER=1.6-alpine
#MEMCD_SERVER=latest
#MEMCD_SERVER=alpine

###
### 1.7 Choose Mongo Server Image
###
### https://www.mongodb.com/evolved
###
#
# MongoDB without arm64 support
#
#MONGO_SERVER=2.8
#MONGO_SERVER=3.0
#MONGO_SERVER=3.2
#
# MongoDB with arm64 support
#
#MONGO_SERVER=3.4
#MONGO_SERVER=3.6
#MONGO_SERVER=4.0
#MONGO_SERVER=4.2
#MONGO_SERVER=4.4
MONGO_SERVER=5.0
#MONGO_SERVER=latest

################################################################################
###
### 2. Host Mounts (Your computer)
###
################################################################################

###
### Global mount options
###
### Note: When adding custom mount options, ensure to start with a
###       leading ',' (comma), as those options are prepended to already
###       existing mount options.
###
### Note: If no mount options are specified, leave this variable empty
###       and do not add a leading ',' (comma).
###
### MOUNT_OPTIONS=,cached
### MOUNT_OPTIONS=
###
### Example: Allow to share mounts accross container with SELINUX enabled
###
### MOUNT_OPTIONS=,z
###
MOUNT_OPTIONS=

###
### Local filesystem path to www projects.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_HTTPD_DATADIR=./data/www

###
### Local filesystem path to where your backups are stored
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_BACKUPDIR=./backups

###
### The path on your host OS of the ssh directory to be mounted into the
### PHP container into /home/devilbox/.ssh.
###
### IMPORTANT: The path is mounted read-only to ensure you cannot accidentally
##             delete anything inside the php container.
###
HOST_PATH_SSH_DIR=~/.ssh

################################################################################
###
### 3. PHP Docker Settings
###
################################################################################

###
### Enable certain PHP modules which are not enabled by default
###
### Currently the only modules that can be enabled are 'ioncube' and 'blackfire'
### Also ensure to disable xdebug when using any of the above:
### https://xdebug.org/docs/install#compat
###
### PHP_MODULES_ENABLE=ioncube, blackfire
###
PHP_MODULES_ENABLE=

###
### Disable any PHP modules that you don't require
###
### Specify a comma separated list without spaces of modules to disable
###
### PHP_MODULES_DISABLE=xdebug,imagick,swoole
###
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole,psr,phalcon

###
### Postfix settings for email catch-all
###
### When set to '1' postfix is normally started and made available. However you still need
### to configure it to your needs yourself. For that you can use the autostart scripts
### and define a couple of 'postconf -e name=value' commands.
###
### When set to '2' (email catch-all), no mail will leave the Devilbox. It is automatically
### internally routed the the devilbox mail account and you can see each sent mail
### in the bundled intranet: https://localhost/mail.php
###
### Values:
### 0: Disable postfix (do not start it)
### 1: Enable/Start postfix
### 2: Enable/Start postfix and enable email catch-all
###
PHP_MAIL_CATCH_ALL=2

###
### Configure everything else about PHP in
### * cfg/php-ini-X.X/*.ini
### * cfg/php-fpm-X.X/*.conf

################################################################################
###
### 4. HTTPD Docker Settings
###
################################################################################

###
### Expose HTTPD Port to Host
###
HOST_PORT_HTTPD=80
HOST_PORT_HTTPD_SSL=443

###
### Globally enable/disable HTTP/2 support
###
### This cannot be done on a per vhost level and must be enabled/disabled globally.
###
### Values:
###  * 0: HTTP/2 is disabled
###  * 1: HTTP/2 is enabled
###
HTTPD_HTTP2_ENABLE=1

###
### SSL (HTTP/HTTPS) settings for automated vhost generation
###
### By default each project will have two vhosts (one for HTTP and one for HTTPS).
### You can control the SSL settings for your projects via the below stated values.
###
### This is internally achieved via the '-m' argument of https://github.com/devilbox/vhost-gen
###
### Values:
###   * both:  Serve HTTP and HTTPS for all projects
###   * redir: HTTP always redirects to HTTPS
###   * ssl:   Only serve HTTPS
###   * plain: Only serve HTTP
###
HTTPD_VHOST_SSL_TYPE=both

###
### Document Root Subdirectory
###
### In your project directory, which subfolder should
### serve your files?
###
### When changing this value, restart the devilbox.
###
HTTPD_DOCROOT_DIR=htdocs

###
### Per vHost Config Subdirectory
###
### In your project directory, which subfolder should
### hold apache, nginx templates for a customized vhost?
###
### When changing this value, restart the devilbox.
###
HTTPD_TEMPLATE_DIR=.devilbox

###
### Remote (Upstream) Backend Timeout
###
### This setting specifies the Timeout for a remote Backend server,
### such as PHP-FPM or a Reverse Proxy.
###
### As for PHP, keep in mind that this value should be greater than
### PHP's max_execution_time,otherwise the php script could still
### run and the webserver will simply drop the connection before getting an answer by PHP.
###
HTTPD_BACKEND_TIMEOUT=180

###
### NGINX ONLY
###
### Set worker_processes and worker_connections
###
### https://nginx.org/en/docs/ngx_core_module.html#worker_processes
### https://nginx.org/en/docs/ngx_core_module.html#worker_connections
###
HTTPD_NGINX_WORKER_PROCESSES=auto
HTTPD_NGINX_WORKER_CONNECTIONS=1024

################################################################################
###
### 5. MySQL Docker Settings
###
################################################################################

###
### MySQL root user password
###
### The password is required for the initial creation of the MySQL database
### as well as the Devilbox intranet to display schema and configuration settings.
###
### If you change your MySQL root user password via mysql cli, phpMyAdmin or other tools
### after the database has been created, ensure to adjust the value here accordingly as well.
###
### If you only change this value here after the database has been created,
### the MySQL root user password will not actually be changed and the Devilbox intranet
### won't be able to connect to the MySQL service.
###
MYSQL_ROOT_PASSWORD=

###
### Expose MySQL Port to Host
###
HOST_PORT_MYSQL=3306

################################################################################
###
### 6. PostgreSQL Docker Settings
###
################################################################################

###
### PostgreSQL 'root' user name (usually postgres)
###
PGSQL_ROOT_USER=postgres

###
### PostgreSQL 'root' user password
###
### If you want to set a password, ensure to remove 'trust' from
### PGSQL_HOST_AUTH_METHOD below
###
PGSQL_ROOT_PASSWORD=

###
### In order to not use a password for PostgreSQL, keep this value at 'trust'
###
PGSQL_HOST_AUTH_METHOD=trust

###
### Expose PostgreSQL Port to Host
###
HOST_PORT_PGSQL=5432

################################################################################
###
### 7. Redis Docker Settings
###
################################################################################

###
### Expose Redis Port to Host
###
HOST_PORT_REDIS=6379

###
### Custom startup arguments
###
### Apply custom startup arguments to redis
###
### Example: Password protection
###   Add password protection to the Redis server by specifying it should
###   require a password.
###   Note: Do not add quotes or spaces to the password
###
###   REDIS_ARGS=--requirepass my-redis-root-password
###
### Example: Verbosity
###
###   REDIS_ARGS=--loglevel verbose
###
REDIS_ARGS=
#REDIS_ARGS=--loglevel verbose --requirepass my-redis-root-password

################################################################################
###
### 8. Memcached Docker Settings
###
################################################################################

###
### Expose Memcached Port to Host
###
HOST_PORT_MEMCD=11211

################################################################################
###
### 9. MongoDB Docker Settings
###
################################################################################

###
### Expose MongoDB Port to Host
###
HOST_PORT_MONGO=27017

################################################################################
###
### 10. Bind Docker Settings
###
################################################################################

###
### Expose Bind Port to Host
###
HOST_PORT_BIND=1053

###
### Add comma separated DNS server from which you want to receive DNS
### You can also add DNS servers from your LAN (if any are available)
###
BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4

###
### Validate DNSSEC
###
### Values:
###  no:    DNSSEC validation is disabled
###  yes:   DNSSEC validation is enabled, but a trust anchor must be manually configured.
###  auto:  DNSSEC validation is enabled, and a default trust anchor for root zone is used.
###
BIND_DNSSEC_VALIDATE=no

###
### Bind timing options (time in seconds)
###
### Leave empty for defaults.
### Only change when you know what you are doing.
###
BIND_TTL_TIME=
BIND_REFRESH_TIME=
BIND_RETRY_TIME=
BIND_EXPIRY_TIME=
BIND_MAX_CACHE_TIME=

###
### Show DNS Queries in Docker logs output?
###
### 1: Yes
### 0: No
BIND_LOG_DNS_QUERIES=0

################################################################################
###
### 11. Custom variables
###
################################################################################

###
### Any variable defined in this file will be available
### as environment variables to your PHP/HHV Docker container.
###
### This might be useful to set application environment and retrieve
### them via: <?php getenv('MY_APPLICATION_ENV'); ?>
###

###
### Example:
### <?php echo getenv('Foo'); ?> would produce: 'some value'
###
#Foo=some value

#ElasticSearch
#Controls the host port on which Elastic Search will be available at.
HOST_PORT_ELK_ELASTIC=9200
#Controls the host port on which Kibana will be available at.
HOST_PORT_ELK_KIBANA=5601
#Controls the ELK stack version to use.
ELK_SERVER=8.6.0

Config: docker-compose.override.yml

# vim: set ft=yaml:
# https://www.docker.elastic.co
---
version: '2.3'

services:

  # -----------------------------------------------------------------------------------------------
  # ELK Stack
  # -----------------------------------------------------------------------------------------------
  elastic:
    #image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ELK_SERVER:-6.6.1}
    image: docker.elastic.co/elasticsearch/elasticsearch:${ELK_SERVER:-6.6.1}
    hostname: elastic
    ports:
      - "${LOCAL_LISTEN_ADDR}${HOST_PORT_ELK_ELASTIC:-9200}:9200"
    networks:
      app_net:
        ipv4_address: 172.16.238.240
    environment:
      - TZ=${TIMEZONE:-UTC}
      - discovery.type=single-node
    volumes:
      - devilbox-elastic:/usr/share/elasticsearch/data

  kibana:
    #image: docker.elastic.co/kibana/kibana-oss:${ELK_SERVER:-6.6.1}
    image: docker.elastic.co/kibana/kibana:${ELK_SERVER:-6.6.1}
    hostname: kibana
    ports:
      - "${LOCAL_LISTEN_ADDR}${HOST_PORT_ELK_KIBANA:-5601}:5601"
    networks:
      app_net:
        ipv4_address: 172.16.238.242
    environment:
      - TZ=${TIMEZONE:-UTC}
      - ELASTICSEARCH_HOSTS=http://elastic:9200
      - ELASTICSEARCH_URL=http://elastic:9200
    depends_on:
      - elastic

volumes:
  devilbox-elastic:

Config: ./check-config.sh

# ==============================================================================
# Checking git
# ==============================================================================
[ERR]   git is unclean
 M docker-compose.yml (this is nothing - just forwarding elasticsearch port 9200 to php)

# ==============================================================================
# Checking .env file
# ==============================================================================
[SUCC]  .env file exists
[SUCC]  .env file is readable
[SUCC]  All variables are present in .env file
[SUCC]  No variables is duplicated in .env file

# ==============================================================================
# Checking .env file values
# ==============================================================================
[ERR]   Variable 'DEBUG_ENTRYPOINT' should be 0, 1 or 2. Has: 4

# ==============================================================================
# Checking required Devilbox core directories exist
# ==============================================================================
[SUCC]  All PHP cfg/ sub directories are present
[SUCC]  All PHP log/ sub directories are present
[SUCC]  All HTTPD cfg/ sub directories are present
[SUCC]  All HTTPD log/ sub directories are present

# ==============================================================================
# Checking devilbox core directory permissions
# ==============================================================================
[SUCC]  All devilbox directories have correct permissions
[SUCC]  All devilbox directories have correct uid
[SUCC]  All devilbox directories have correct gid

# ==============================================================================
# Checking devilbox core file permissions
# ==============================================================================
[SUCC]  All devilbox files have correct permissions
[SUCC]  All devilbox files have correct uid
[SUCC]  All devilbox files have correct gid

# ==============================================================================
# Checking projects permissions
# ==============================================================================
[SUCC]  All project dirs have correct permissions
[SUCC]  All project dirs have correct uid
[SUCC]  All project dirs have correct gid

# ==============================================================================
# Checking projects settings
# ==============================================================================
[SUCC]  All projects have valid DNS records
[SUCC]  All projects have valid HTTPD_DOCROOT_DIR

# ==============================================================================
# Checking customizations
# ==============================================================================
[NOTE]  [docker]     Custom docker-compose.override.yml present
[NOTE]  [php.ini]    Custom config present in cfg/php-ini-8.1/

# ==============================================================================
# SUMMARY
# ==============================================================================
[ERR]   Found 2 error(s)
[ERR]   Devilbox might not work properly
[ERR]   Fix the issues before submitting a bug report
[NOTE]  2 custom configurations applied. If you encounter issues, reset them first.
[INFO]  Ensure to run 'docker-compose stop; docker-compose rm -f' on .env changes or custom configs

Log: docker-compose logs

[+] Running 4/3
 ⠿ Container devilbox-bind-1   Created                                                                                                             0.0s
 ⠿ Container devilbox-php-1    Created                                                                                                             0.1s
 ⠿ Container devilbox-httpd-1  Created                                                                                                             0.0s
 ⠿ Container devilbox-mysql-1  Created                                                                                                             0.0s
Attaching to devilbox-bind-1, devilbox-httpd-1, devilbox-mysql-1, devilbox-php-1
devilbox-bind-1   | [WARN] Wrong value for DEBUG_ENTRYPOINT: '4'. Setting to 1
devilbox-bind-1   | [INFO] Debug level: 1
devilbox-bind-1   | 
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | /etc/bind/named.conf
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | include "/etc/bind/named.conf.logging";
devilbox-bind-1   | include "/etc/bind/named.conf.options";
devilbox-bind-1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devilbox-bind-1   | [INFO] BIND logging: disabled explicitly
devilbox-bind-1   | [INFO] Using default DNS TTL time: 3600 sec
devilbox-bind-1   | [INFO] Using default DNS Refresh time: 1200 sec
devilbox-bind-1   | [INFO] Using default DNS Retry time: 180 sec
devilbox-bind-1   | [INFO] Using default DNS Expiry time: 1209600 sec
devilbox-bind-1   | [INFO] Using default DNS Max Cache time: 10800 sec
devilbox-bind-1   | [INFO] Changing DNS Max Cache size to: 90%
devilbox-bind-1   | [INFO] Not adding any PTR records
devilbox-bind-1   | [INFO] Adding A Record: *.loc -> 127.0.0.1
devilbox-bind-1   | [INFO] Not adding any CNAME records
devilbox-bind-1   | [INFO] $ALLOW_QUERY not set.
devilbox-bind-1   | [INFO] DNS query rules will not be set
devilbox-bind-1   | [INFO] $ALLOW_RECURSION not set.
devilbox-bind-1   | [INFO] DNS recursion rules will not be set
devilbox-bind-1   | [INFO] DNSSEC Validation: no
devilbox-bind-1   | [INFO] Adding custom DNS forwarder: 8.8.8.8,8.8.4.4
devilbox-bind-1   | 
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | /etc/bind/named.conf.options
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | options {
devilbox-bind-1   |     directory "/var/cache/bind";
devilbox-bind-1   |     dnssec-validation no;
devilbox-bind-1   |     auth-nxdomain no;    # conform to RFC1035
devilbox-bind-1   |     listen-on-v6 { any; };
devilbox-bind-1   |     max-cache-size 90%;
devilbox-bind-1   |     response-policy { zone "rpz"; };
devilbox-bind-1   |     forwarders {
devilbox-bind-1   |         8.8.8.8;
devilbox-bind-1   |         8.8.4.4;
devilbox-bind-1   |     };
devilbox-bind-1   | };
devilbox-bind-1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devilbox-bind-1   | 
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | /etc/bind/custom/conf/rpz.conf
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | zone "rpz" IN {
devilbox-bind-1   |     type master;
devilbox-bind-1   |     allow-transfer { any; };
devilbox-bind-1   |     allow-update { any; };
devilbox-bind-1   |     file "/etc/bind/custom/zone/rpz";
devilbox-bind-1   | };
devilbox-bind-1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devilbox-bind-1   | 
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | /etc/bind/custom/zone/rpz
devilbox-bind-1   | --------------------------------------------------------------------------------
devilbox-bind-1   | $TTL 3600
devilbox-bind-1   | @                               IN   SOA     bind. admin.bind. (
devilbox-bind-1   |                                              1674689362     ; Serial number
devilbox-bind-1   |                                              1200           ; Refresh time
devilbox-bind-1   |                                              180            ; Retry time
devilbox-bind-1   |                                              1209600        ; Expiry time
devilbox-bind-1   |                                              10800          ; Negative Cache TTL
devilbox-bind-1   | )
devilbox-bind-1   | 
devilbox-bind-1   | ; NS Records
devilbox-bind-1   |                                 IN   NS      bind.
devilbox-bind-1   | 
devilbox-bind-1   | ; Custom Records
devilbox-bind-1   | *.loc                           IN   A       127.0.0.1
devilbox-bind-1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devilbox-bind-1   | [INFO] Starting BIND 9.18.10
devilbox-php-1    | [INFO] Debug level: 4
devilbox-php-1    | [INFO] Changing user 'devilbox' uid to: 1000
devilbox-php-1    | root $ usermod -u 1000 devilbox 2>/dev/null
devilbox-php-1    | usermod: no changes
devilbox-php-1    | root $ chown -R devilbox /home/devilbox 2>/dev/null || true
devilbox-php-1    | root $ chown -R devilbox /var/lib/php/session
devilbox-php-1    | root $ chown -R devilbox /var/lib/php/wsdlcache
devilbox-php-1    | root $ chown -R devilbox /var/spool/mail/devilbox
devilbox-php-1    | root $ chown -R devilbox /etc/supervisor/custom.d
devilbox-php-1    | [INFO] Changing group 'devilbox' gid to: 1000
devilbox-php-1    | root $ groupmod -g 1000 devilbox 2>/dev/null
devilbox-php-1    | root $ chown -R :devilbox /home/devilbox 2>/dev/null || true
devilbox-php-1    | root $ chown -R :devilbox /var/lib/php/session
devilbox-php-1    | root $ chown -R :devilbox /var/lib/php/wsdlcache
devilbox-php-1    | root $ chown -R :devilbox /var/spool/mail/devilbox
devilbox-php-1    | root $ chown -R :devilbox /etc/supervisor/custom.d
devilbox-php-1    | [INFO] Setting container timezone to: UTC
devilbox-php-1    | root $ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
devilbox-php-1    | [INFO] Setting PHP: timezone=UTC
devilbox-php-1    | root $ echo 'date.timezone = UTC' > /usr/local/etc/php/conf.d/devilbox-runtime-timezone.ini
devilbox-php-1    | [INFO] Docker date set to: Wed Jan 25 23:29:23 UTC 2023
devilbox-php-1    | [INFO] $DOCKER_LOGS set to 1. Logging to docker logs (stdout and stderr).
devilbox-php-1    | [INFO] $ENABLE_MAIL set to 2. Enabling postfix catch-all
devilbox-php-1    | root $ chmod 0644 /var/mail/devilbox
devilbox-php-1    | root $ chown devilbox:devilbox /var/mail
devilbox-php-1    | root $ chown devilbox:devilbox /var/mail/devilbox
devilbox-php-1    | root $ postconf -e 'strict_mailbox_ownership=no'
devilbox-php-1    | root $ postconf -e 'inet_protocols=ipv4'
devilbox-php-1    | root $ postconf -e 'myhostname=localhost'
devilbox-php-1    | root $ postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'
devilbox-php-1    | root $ echo '/.*@.*/ devilbox' >> /etc/postfix/virtual
devilbox-php-1    | root $ newaliases
devilbox-httpd-1  | [INFO] Entrypoint debug: 4
devilbox-httpd-1  | [INFO] Runtime debug: 1
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Environment Variables (set/default)
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Variables: General:
devilbox-httpd-1  | [INFO]     Set     $NEW_UID                    Value:   1000
devilbox-httpd-1  | [INFO]     Set     $NEW_GID                    Value:   1000
devilbox-httpd-1  | [INFO]     Set     $TIMEZONE                   Value:   UTC
devilbox-httpd-1  | [INFO] Variables: Main Vhost:
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_ENABLE          Value:   1
devilbox-httpd-1  | [INFO]     Unset   $MAIN_VHOST_DOCROOT_DIR     Default: htdocs
devilbox-httpd-1  | [INFO]     Unset   $MAIN_VHOST_TEMPLATE_DIR    Default: cfg
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_ALIASES_ALLOW   Value:   /devilbox-api/:/var/www/default/api, /vhost.d/:/etc/httpd
devilbox-httpd-1  | [INFO]     Unset   $MAIN_VHOST_ALIASES_DENY    Default: /\.git, /\.ht.*
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_BACKEND         Value:   conf:phpfpm:tcp:172.16.238.10:9000
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_BACKEND_TIMEOUT Value:   180
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_SSL_TYPE        Value:   both
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_SSL_CN          Value:   localhost,*.localhost,devilbox,*.devilbox,httpd
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_STATUS_ENABLE   Value:   1
devilbox-httpd-1  | [INFO]     Set     $MAIN_VHOST_STATUS_ALIAS    Value:   /devilbox-httpd-status
devilbox-httpd-1  | [INFO] Variables: Mass Vhost:
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_ENABLE          Value:   1
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_DOCROOT_DIR     Value:   htdocs
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_TEMPLATE_DIR    Value:   .devilbox
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_ALIASES_ALLOW   Value:   /devilbox-api/:/var/www/default/api:http(s)?://(.*)$
devilbox-httpd-1  | [INFO]     Unset   $MASS_VHOST_ALIASES_DENY    Default: /\.git, /\.ht.*
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_BACKEND         Value:   conf:phpfpm:tcp:172.16.238.10:9000
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_BACKEND_REWRITE Value:   file:backend.cfg
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_BACKEND_TIMEOUT Value:   180
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_SSL_TYPE        Value:   both
devilbox-httpd-1  | [INFO]     Set     $MASS_VHOST_TLD_SUFFIX      Value:   .loc
devilbox-httpd-1  | [INFO] Variables: Misc:
devilbox-httpd-1  | [INFO]     Set     $WORKER_CONNECTIONS         Value:   1024
devilbox-httpd-1  | [INFO]     Set     $WORKER_PROCESSES           Value:   auto
devilbox-httpd-1  | [INFO]     Set     $HTTP2_ENABLE               Value:   1
devilbox-httpd-1  | [INFO]     Set     $DOCKER_LOGS                Value:   1
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Validate Settings
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Settings: General:
devilbox-httpd-1  | [OK]       Valid   $NEW_UID                    User ID (uid)       1000
devilbox-httpd-1  | [OK]       Valid   $NEW_GID                    Group ID (gid)      1000
devilbox-httpd-1  | [OK]       Valid   $TIMEZONE                   ignored             (not specified)
devilbox-httpd-1  | [INFO] Settings: Main Vhost:
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_ENABLE          Default vhost       Enabled
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_DOCROOT_DIR     Document root:      /var/www/default/htdocs
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_TEMPLATE_DIR    Template dir        /var/www/default/cfg
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_ALIASES_ALLOW   Defined Aliases     /devilbox-api/, /vhost.d/
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_ALIASES_DENY    Defined Aliases     /\.git, /\.ht.*
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_BACKEND         PHP via PHP-FPM     Remote: tcp://172.16.238.10:9000
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_BACKEND_TIMEOUT Timeout:            180sec
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_SSL_TYPE        Vhost protocol      HTTP and HTTPS
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_SSL_CN          SSL cert subject    CN = localhost,*.localhost,devilbox,*.devilbox,httpd
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_STATUS_ENABLE   Status page         Enabled
devilbox-httpd-1  | [OK]       Valid   $MAIN_VHOST_STATUS_ALIAS    Status page URL     /devilbox-httpd-status
devilbox-httpd-1  | [INFO] Settings: Mass Vhost:
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_ENABLE          Mass vhost          Enabled
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_DOCROOT_DIR     Document root:      /shared/httpd/<project>/htdocs
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_TEMPLATE_DIR    Template dir        /shared/httpd/<project>/.devilbox
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_ALIASES_ALLOW   Defined Aliases     /devilbox-api/
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_ALIASES_DENY    Defined Aliases     /\.git, /\.ht.*
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_BACKEND         PHP via PHP-FPM     Remote: tcp://172.16.238.10:9000
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_BACKEND_REWRITE Backend overwrite   /shared/httpd/<project>/.devilbox/backend.cfg
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_BACKEND_TIMEOUT Timeout:            180sec
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_SSL_TYPE        Vhost protocol      HTTP and HTTPS
devilbox-httpd-1  | [OK]       Valid   $MASS_VHOST_TLD_SUFFIX      Vhost domain        <project>.loc
devilbox-httpd-1  | [INFO] Settings: Misc:
devilbox-httpd-1  | [OK]       Valid   $WORKER_CONNECTIONS         worker_connections  1024
devilbox-httpd-1  | [OK]       Valid   $WORKER_PROCESSES           worker_processes    auto
devilbox-httpd-1  | [OK]       Valid   $HTTP2_ENABLE               HTTP/2              Enabled
devilbox-httpd-1  | [OK]       Valid   $DOCKER_LOGS                Log to              stdout and stderr
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Apply Settings
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Setting uid to 1000 (user: nginx)
devilbox-httpd-1  | [CMD]  usermod -u 1000 nginx
devilbox-httpd-1  | [CMD]  id nginx
devilbox-httpd-1  | uid=1000(nginx) gid=101(nginx) groups=101(nginx),101(nginx)
devilbox-httpd-1  | [INFO] Setting gid to 1000 (group: nginx)
devilbox-httpd-1  | [CMD]  groupmod -g 1000 nginx
devilbox-httpd-1  | [CMD]  id nginx
devilbox-httpd-1  | uid=1000(nginx) gid=1000(nginx) groups=1000(nginx),1000(nginx)
devilbox-httpd-1  | [INFO] Skipping timezone. Already set to UTC: Wed Jan 25 23:29:24 UTC 2023
devilbox-httpd-1  | [INFO] vhost-gen: no custom global template found in: /etc/vhost-gen.d/nginx.yml
devilbox-httpd-1  | [CMD]  vhost-gen -v -d -n "localhost" -p "/var/www/default/htdocs" -c "/etc/vhost-gen/main.yml" -o "/var/www/default/cfg" -s -m "both" -t "/etc/vhost-gen/templates-main/"
devilbox-httpd-1  | vhost-gen: [INFO] Loading configuration file        (-c): /etc/vhost-gen/main.yml
devilbox-httpd-1  | vhost-gen: [INFO] Loading vhost template (global)   (-t): /etc/vhost-gen/templates-main/nginx.yml
devilbox-httpd-1  | vhost-gen: [INFO] Loading vhost template (override) (-o): /var/www/default/cfg/nginx.yml
devilbox-httpd-1  | vhost-gen: [INFO] Override Vhost template not found: /var/www/default/cfg/nginx.yml
devilbox-httpd-1  | vhost-gen: [INFO] Creating vhost type: https and http (both)
devilbox-httpd-1  | vhost-gen: [INFO] Using vhost name: localhost
devilbox-httpd-1  | vhost-gen: [INFO] Log setting: stdout -> /dev/stdout
devilbox-httpd-1  | vhost-gen: [INFO] Log setting: stderr -> /dev/stderr
devilbox-httpd-1  | vhost-gen: [INFO] Log setting: dir -> True
devilbox-httpd-1  | vhost-gen: [INFO] Log setting: Not specified
devilbox-httpd-1  | vhost-gen: [INFO] Vhost config written to: /etc/httpd/conf.d/localhost.conf
devilbox-httpd-1  | [TRC]  server {
devilbox-httpd-1  |     listen       443 ssl http2 default_server;
devilbox-httpd-1  |     server_name  _;
devilbox-httpd-1  |     access_log   "/tmp/www-access.log" combined;
devilbox-httpd-1  |     error_log    "/tmp/www-error.log" warn;
devilbox-httpd-1  |     ssl_certificate           /etc/httpd/cert/main/localhost.crt;
devilbox-httpd-1  |     ssl_certificate_key       /etc/httpd/cert/main/localhost.key;
devilbox-httpd-1  |     ssl_protocols             TLSv1 TLSv1.1 TLSv1.2;
devilbox-httpd-1  |     ssl_prefer_server_ciphers on;
devilbox-httpd-1  |     ssl_ciphers               HIGH:!aNULL:!MD5;
devilbox-httpd-1  |     # Define the vhost to serve files
devilbox-httpd-1  |     root         "/var/www/default/htdocs/";
devilbox-httpd-1  |     index        index.php index.html index.htm;
devilbox-httpd-1  |     # PHP-FPM Definition
devilbox-httpd-1  |     location / {
devilbox-httpd-1  |         try_files $uri $uri/ /index.php$is_args$args;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # CHANGED:
devilbox-httpd-1  |     #location ~ \.php?$ {
devilbox-httpd-1  |     location ~ \.php($|/) {
devilbox-httpd-1  |         set $script $uri;
devilbox-httpd-1  |         if ($uri ~ "^(.+\.php)(/.+)") {
devilbox-httpd-1  |             set $script $1;
devilbox-httpd-1  |         }
devilbox-httpd-1  |     # end of CHANGED:
devilbox-httpd-1  |         try_files $uri = 404;
devilbox-httpd-1  |         include fastcgi_params;
devilbox-httpd-1  |         # https://stackoverflow.com/questions/1733306/nginx-errors-readv-and-recv-failed/51457613#51457613
devilbox-httpd-1  |         fastcgi_keep_conn off;
devilbox-httpd-1  |         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
devilbox-httpd-1  |         fastcgi_split_path_info ^(.+\.php)(.*)$;
devilbox-httpd-1  |         fastcgi_pass 172.16.238.10:9000;
devilbox-httpd-1  |         fastcgi_read_timeout 180;
devilbox-httpd-1  |         fastcgi_index index.php;
devilbox-httpd-1  |         fastcgi_intercept_errors on;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Alias Definition
devilbox-httpd-1  |     location ~ /devilbox-api/ {
devilbox-httpd-1  |         root  /var/www/default/api;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Alias Definition
devilbox-httpd-1  |     location ~ /vhost.d/ {
devilbox-httpd-1  |         root  /etc/httpd;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Deny Definition
devilbox-httpd-1  |     location ~ /\.git {
devilbox-httpd-1  |         deny all;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Deny Definition
devilbox-httpd-1  |     location ~ /\.ht.* {
devilbox-httpd-1  |         deny all;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Status Page
devilbox-httpd-1  |     location ~ /devilbox-httpd-status {
devilbox-httpd-1  |         stub_status on;
devilbox-httpd-1  |         access_log off;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Custom directives
devilbox-httpd-1  | }
devilbox-httpd-1  | server {
devilbox-httpd-1  |     listen       80 default_server;
devilbox-httpd-1  |     server_name  _;
devilbox-httpd-1  |     access_log   "/tmp/www-access.log" combined;
devilbox-httpd-1  |     error_log    "/tmp/www-error.log" warn;
devilbox-httpd-1  |     # Define the vhost to serve files
devilbox-httpd-1  |     root         "/var/www/default/htdocs/";
devilbox-httpd-1  |     index        index.php index.html index.htm;
devilbox-httpd-1  |     # PHP-FPM Definition
devilbox-httpd-1  |     location / {
devilbox-httpd-1  |         try_files $uri $uri/ /index.php$is_args$args;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # CHANGED:
devilbox-httpd-1  |     #location ~ \.php?$ {
devilbox-httpd-1  |     location ~ \.php($|/) {
devilbox-httpd-1  |         set $script $uri;
devilbox-httpd-1  |         if ($uri ~ "^(.+\.php)(/.+)") {
devilbox-httpd-1  |             set $script $1;
devilbox-httpd-1  |         }
devilbox-httpd-1  |     # end of CHANGED:
devilbox-httpd-1  |         try_files $uri = 404;
devilbox-httpd-1  |         include fastcgi_params;
devilbox-httpd-1  |         # https://stackoverflow.com/questions/1733306/nginx-errors-readv-and-recv-failed/51457613#51457613
devilbox-httpd-1  |         fastcgi_keep_conn off;
devilbox-httpd-1  |         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
devilbox-httpd-1  |         fastcgi_split_path_info ^(.+\.php)(.*)$;
devilbox-httpd-1  |         fastcgi_pass 172.16.238.10:9000;
devilbox-httpd-1  |         fastcgi_read_timeout 180;
devilbox-httpd-1  |         fastcgi_index index.php;
devilbox-httpd-1  |         fastcgi_intercept_errors on;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Alias Definition
devilbox-httpd-1  |     location ~ /devilbox-api/ {
devilbox-httpd-1  |         root  /var/www/default/api;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Alias Definition
devilbox-httpd-1  |     location ~ /vhost.d/ {
devilbox-httpd-1  |         root  /etc/httpd;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Deny Definition
devilbox-httpd-1  |     location ~ /\.git {
devilbox-httpd-1  |         deny all;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Deny Definition
devilbox-httpd-1  |     location ~ /\.ht.* {
devilbox-httpd-1  |         deny all;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Status Page
devilbox-httpd-1  |     location ~ /devilbox-httpd-status {
devilbox-httpd-1  |         stub_status on;
devilbox-httpd-1  |         access_log off;
devilbox-httpd-1  |     }
devilbox-httpd-1  |     # Custom directives
devilbox-httpd-1  | }
devilbox-httpd-1  | [INFO] Existing Certificate Authority files found in: /ca
devilbox-httpd-1  | [CMD]  mkdir -p /etc/httpd/cert/main
devilbox-httpd-1  | [CMD]  cert-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox -n 'localhost' -e 'admin@localhost' -a 'localhost *.localhost devilbox *.devilbox httpd' "/ca/devilbox-ca.key" "/ca/devilbox-ca.crt" "/etc/httpd/cert/main/localhost.key" "/etc/httpd/cert/main/localhost.csr" "/etc/httpd/cert/main/localhost.crt"
devilbox-httpd-1  | cert-gen: [INFO] Create CSR file: /etc/httpd/cert/main/localhost.csr
devilbox-httpd-1  | cert-gen: [INFO] Create CRT file: /etc/httpd/cert/main/localhost.crt
devilbox-httpd-1  | cert-gen: [INFO] Verify CRT file: /etc/httpd/cert/main/localhost.crt
devilbox-httpd-1  | cert-gen: [INFO] Verify CRT against CA file: /ca/devilbox-ca.crt
devilbox-httpd-1  | [INFO] Fixing ownership (recursively) in: /ca
devilbox-httpd-1  | [CMD]  chown -R 1000:1000 /ca
devilbox-httpd-1  | [INFO] Setting Nginx worker_processes to: auto
devilbox-httpd-1  | [CMD]  sed -i'' 's/__WORKER_PROCESSES__/auto/g' /etc/nginx/nginx.conf
devilbox-httpd-1  | [INFO] Setting Nginx worker_connections to: 1024
devilbox-httpd-1  | [CMD]  sed -i'' 's/__WORKER_CONNECTIONS__/1024/g' /etc/nginx/nginx.conf
devilbox-mysql-1  | 2023-01-25 23:29:25+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.11+maria~ubu2004 started.
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [INFO] Main Entrypoint
devilbox-httpd-1  | [INFO] -------------------------------------------------------------------------
devilbox-httpd-1  | [DONE] Starting supervisord: 4.2.4 [HTTPD: nginx/1.22.1]
devilbox-mysql-1  | 2023-01-25 23:29:25+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
devilbox-mysql-1  | 2023-01-25 23:29:25+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.11+maria~ubu2004 started.
devilbox-php-1    | [INFO] Forwarding httpd:80 to 127.0.0.1:80 inside this docker.
devilbox-php-1    | [INFO] Forwarding httpd:443 to 127.0.0.1:443 inside this docker.
devilbox-php-1    | [INFO] Forwarding mysql:3306 to 127.0.0.1:3306 inside this docker.
devilbox-php-1    | [INFO] Forwarding pgsql:5432 to 127.0.0.1:5432 inside this docker.
devilbox-php-1    | [INFO] Forwarding redis:6379 to 127.0.0.1:6379 inside this docker.
devilbox-php-1    | [INFO] Forwarding memcd:11211 to 127.0.0.1:11211 inside this docker.
devilbox-php-1    | [INFO] Forwarding mongo:27017 to 127.0.0.1:27017 inside this docker.
devilbox-php-1    | [INFO] Forwarding elastic:9200 to 127.0.0.1:9002 inside this docker.
devilbox-php-1    | [INFO] Forwarding txtai:8001 to 127.0.0.1:8001 inside this docker.
devilbox-php-1    | [INFO] Enabling 'socat-80-httpd-80' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-443-httpd-443' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-3306-mysql-3306' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-5432-pgsql-5432' to be started by supervisord
devilbox-mysql-1  | 2023-01-25 23:29:25+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
devilbox-php-1    | [INFO] Enabling 'socat-6379-redis-6379' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-11211-memcd-11211' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-27017-mongo-27017' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-9002-elastic-9200' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'socat-8001-txtai-8001' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'rsyslogd' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'postfix' to be started by supervisord
devilbox-php-1    | [INFO] Enabling 'php-fpm' to be started by supervisord
devilbox-php-1    | [INFO] PHP.ini: xdebug.ini -> /usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-xdebug.ini
devilbox-php-1    | root $ cp /etc/php-custom.d/xdebug.ini /usr/local/etc/php/conf.d/yyy-devilbox-user-runtime-xdebug.ini
devilbox-php-1    | root $ find /usr/local/etc/php/conf.d -type f -iname '*.ini' -exec chmod 0644 "{}" \;
devilbox-mysql-1  | 2023-01-25 23:29:25 0 [Note] mysqld (server 10.6.11-MariaDB-1:10.6.11+maria~ubu2004-log) starting as process 1 ...
devilbox-mysql-1  | 2023-01-25 23:29:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
devilbox-mysql-1  | 2023-01-25 23:29:25 0 [Note] InnoDB: Number of pools: 1
devilbox-mysql-1  | 2023-01-25 23:29:25 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
devilbox-mysql-1  | 2023-01-25 23:29:25 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
devilbox-php-1    | root $ find /usr/local/etc/php-fpm.d -type f -iname '*.conf' -exec chmod 0644 "{}" \;
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Using Linux native AIO
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Completed initialization of buffer pool
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: 128 rollback segments are active.
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Creating shared tablespace for temporary tables
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: 10.6.11 started; log sequence number 365501694; transaction id 187309
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] Plugin 'FEEDBACK' is disabled.
devilbox-php-1    | [INFO] $ENABLE_MODULES set, but empty. Not enabling any PHP modules.
devilbox-php-1    | [INFO] Disabling the following PHP modules: oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole,psr,phalcon
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] Server socket created on IP: '0.0.0.0'.
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] Server socket created on IP: '::'.
devilbox-php-1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini
devilbox-php-1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-pdo_sqlsrv.ini
devilbox-php-1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-sqlsrv.ini
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] mysqld: ready for connections.
devilbox-mysql-1  | Version: '10.6.11-MariaDB-1:10.6.11+maria~ubu2004-log'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
devilbox-php-1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-rdkafka.ini
devilbox-php-1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini
devilbox-php-1    | root $ chown devilbox:devilbox /etc/mysqldump-secure.conf
devilbox-php-1    | root $ chown devilbox:devilbox /etc/mysqldump-secure.cnf
devilbox-php-1    | root $ chown devilbox:devilbox /var/log/mysqldump-secure.log
devilbox-php-1    | root $ chown devilbox:devilbox /shared/backups/mysql
devilbox-php-1    | [INFO] $MYSQL_BACKUP_USER set for mysqldump-secure. Changing to 'root'
devilbox-php-1    | root $ sed -i'' 's/^user.*/user = root/g' /etc/mysqldump-secure.cnf
devilbox-php-1    | [INFO] $MYSQL_BACKUP_PASS set for mysqldump-secure. Changing to '******'
devilbox-php-1    | root $ perl -pi -e 's/^password.*/password = /g' /etc/mysqldump-secure.cnf
devilbox-php-1    | [INFO] $MYSQL_BACKUP_HOST set for mysqldump-secure. Changing to 'mysql'
devilbox-php-1    | root $ sed -i'' 's/^host.*/host = mysql/g' /etc/mysqldump-secure.cnf
devilbox-php-1    | root $ chown devilbox:devilbox /shared/backups
devilbox-php-1    | root $ chown devilbox:devilbox /shared/httpd
devilbox-php-1    | root $ chmod 0755 /shared/backups
devilbox-php-1    | root $ chmod 0755 /shared/httpd
devilbox-php-1    | root $ cp /ca/devilbox-ca.crt /usr/local/share/ca-certificates/devilbox-devilbox-ca.crt
devilbox-php-1    | root $ update-ca-certificates
devilbox-php-1    | Updating certificates in /etc/ssl/certs...
devilbox-mysql-1  | 2023-01-25 23:29:26 0 [Note] InnoDB: Buffer pool(s) load completed at 230125 23:29:26
devilbox-php-1    | 1 added, 0 removed; done.
devilbox-php-1    | Running hooks in /etc/ca-certificates/update.d...
devilbox-php-1    | done.
devilbox-php-1    | [INFO] Starting supervisord
devilbox-php-1    | 2023-01-25 23:29:27,206 WARN No file matches via include "/etc/supervisor/custom.d/*.conf"
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/php-fpm.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/postfix.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/rsyslogd.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-11211-memcd-11211.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-27017-mongo-27017.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-3306-mysql-3306.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-443-httpd-443.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-5432-pgsql-5432.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-6379-redis-6379.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-80-httpd-80.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-8001-txtai-8001.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Included extra file "/etc/supervisor/conf.d/socat-9002-elastic-9200.conf" during parsing
devilbox-php-1    | 2023-01-25 23:29:27,206 INFO Set uid to user 0 succeeded
devilbox-php-1    | 2023-01-25 23:29:27,208 INFO supervisord started with pid 1
devilbox-php-1    | 2023-01-25 23:29:28,211 INFO spawned: 'rsyslogd' with pid 1545
devilbox-php-1    | 2023-01-25 23:29:28,212 INFO spawned: 'php-fpm' with pid 1546
devilbox-php-1    | 2023-01-25 23:29:28,214 INFO spawned: 'postfix' with pid 1547
devilbox-php-1    | 2023-01-25 23:29:28,216 INFO spawned: 'socat-11211-memcd-11211' with pid 1548
devilbox-php-1    | 2023-01-25 23:29:28,219 INFO spawned: 'socat-27017-mongo-27017' with pid 1549
devilbox-php-1    | 2023-01-25 23:29:28,220 INFO spawned: 'socat-3306-mysql-3306' with pid 1551
devilbox-php-1    | 2023-01-25 23:29:28,222 INFO spawned: 'socat-443-httpd-443' with pid 1552
devilbox-php-1    | 2023-01-25 23:29:28,225 INFO spawned: 'socat-5432-pgsql-5432' with pid 1553
devilbox-php-1    | 2023-01-25 23:29:28,227 INFO spawned: 'socat-6379-redis-6379' with pid 1554
devilbox-php-1    | 2023-01-25 23:29:28,230 INFO spawned: 'socat-80-httpd-80' with pid 1555
devilbox-php-1    | 2023-01-25 23:29:28,233 INFO spawned: 'socat-8001-txtai-8001' with pid 1556
devilbox-php-1    | 2023-01-25 23:29:28,236 INFO spawned: 'socat-9002-elastic-9200' with pid 1559
devilbox-php-1    | [25-Jan-2023 23:29:28] NOTICE: fpm is running, pid 1546
devilbox-php-1    | [25-Jan-2023 23:29:28] NOTICE: ready to handle connections
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: postfix entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-11211-memcd-11211 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-27017-mongo-27017 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-3306-mysql-3306 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-443-httpd-443 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-5432-pgsql-5432 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-6379-redis-6379 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-80-httpd-80 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-8001-txtai-8001 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 2023-01-25 23:29:29,299 INFO success: socat-9002-elastic-9200 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:39 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:40 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:41 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:44 +0000 "GET /index.php" 302
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:42 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:43 +0000 "GET /_ajax_callback.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:43 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:47 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:47 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:47 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:47 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:50 +0000 "GET /index.php" 302
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:48 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:52 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:52 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:29:52 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:02 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:04 +0000 "GET /index.php" 302
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:03 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:07 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:07 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:17 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:20 +0000 "GET /index.php" 302
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:18 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:22 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:22 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:24 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:32 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:33 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:38 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  25/Jan/2023:23:30:39 +0000 "GET /index.php" 200

(Optional) Additional information

Windows Hosts File

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
127.0.0.1 cryptomator-vault
127.0.0.1 site.loc
nickchomey commented 1 year ago

After doing a bit more debugging/observation, I notice this pop up in the docker log just before everything fails.

devilbox-redis-1  | 1:M 25 Jan 2023 00:33:36.494 * 10000 changes in 60 seconds. Saving...
devilbox-redis-1  | 1:M 25 Jan 2023 00:33:36.495 * Background saving started by pid 15
devilbox-redis-1  | 15:C 25 Jan 2023 00:33:36.540 * DB saved on disk
devilbox-redis-1  | 15:C 25 Jan 2023 00:33:36.540 * RDB: 2 MB of memory used by copy-on-write
devilbox-redis-1  | 1:M 25 Jan 2023 00:33:36.595 * Background saving terminated with success

However, if I restart docker without redis, the problem still persists and I dont see anything in particular in the log.

When I look at the logs in /devilbox/log, there's nothing at all for mariadb, and nginx-mainline. nginx-stable has various files but nothing in them seems relevant. Likewise for php-fpm

Are there any particular tests/diagnostics I could do?

nickchomey commented 1 year ago

In fact, even if I do NOTHING - dont connect to the vhost, mysql, redis, http://127.0.0.1, etc... - it break after 5 minutes or so.

Likewise, if I only start bind php httpd, and then do nothing, it will break.

nickchomey commented 1 year ago

I tried using v2.4.0 and same problem.

nickchomey commented 1 year ago

If I use netstat -abon in an elevated Powershell, I can see the docker/wsl-related ports. But they all disappear when it breaks.

 TCP    127.0.0.1:25           0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:53           0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:80           0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52145        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52146        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52147        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52148        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52149        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:80           127.0.0.1:52150        ESTABLISHED     11296
 [wslhost.exe]
  TCP    127.0.0.1:443          0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:953          0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:1001         0.0.0.0:0              LISTENING       4
 Can not obtain ownership information
  TCP    127.0.0.1:2915         0.0.0.0:0              LISTENING       16836
 [qbittorrent.exe]
  TCP    127.0.0.1:3306         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:5354         0.0.0.0:0              LISTENING       5604
 [mDNSResponder.exe]
  TCP    127.0.0.1:5432         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:6379         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:8001         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:9001         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
  TCP    127.0.0.1:9200         0.0.0.0:0              LISTENING       11296
 [wslhost.exe]
nickchomey commented 1 year ago

I just fully reinstalled WSL2, Ubuntu, Devilbox etc... and the problem seems to have gone away. I'll close this for now and re-open if it comes back/I find more useful information about it.

nickchomey commented 1 year ago

Nope - problem is back and I cant find any reason or fix.

Strangely, now when Devilbox crashes, sometimes I can't even access localhost, yet I can access 127.0.0.1, neither of which happened previously. I'm not aware of any particular changes that I might have made to affect this.

I have updated the config files, logs, etc... in the OP here with the latest details

nickchomey commented 1 year ago

I'm closing this again - I restored a Windows 11 backup from a week ago and it is working again with the latest version of Devilbox. I will start applying updates one by one til I find the issue

nickchomey commented 1 year ago

@cytopia Nevermind, it is still happening without any updates.

Interestingly, I can access mysql with HeidiSQL if I use localhost rather than 127.0.01.

Also, now that I'm using .dvl.to, the site seems to continue working even when 127.0.0.1 is broken. Though, I do believe there have been instances today where localhost and site.dvl.to stops working as well... Also, the frontend seems to work sometimes while, at the same time, I can't access wp-admin - even while I can still access mysql with HeidiSQL on localhost

Quite the frustrating mystery...

Any insights/suggestions for tests/commands I can run in WSL2/Ubuntu or Windows 11 PowerShell?

nickchomey commented 1 year ago

Very weird - right now I can access Mysql with HeidiSQL on localhost:3306. But I can't access Redis with Redis Insight on localhost:6379. Likewise, I can't even access the Devilbox dashboard on either localhost or 127.0.0.1

And now, a few minutes later after a restart of devilbox, i can access some stuff and not others.

There really doesn't seem to be a pattern. Certain things just break sporadically. And it seems independent of what I'm doing on the site, which plugins are installed etc... As I mentioned above somewhere, sometimes it just breaks even if I dont actually access anything at all - just start devilbox and leave it to die on its own.

nickchomey commented 1 year ago

These screen recordings might be useful to see the utter randomness of it all. They were taken back to back, so just treat them as one video rather than from separate instances.

https://user-images.githubusercontent.com/88559987/215152457-91ebc020-3e25-47da-ad02-04ee18f9a8dc.mp4

https://user-images.githubusercontent.com/88559987/215152481-d2bbc235-351d-4ed2-b7e1-45dce93057ff.mp4

As you can see, I can browse certain pages on the front end, but not others. Likewise in teh backend.

And I can still browse Redis Insight and HeidiSQL. However you can see that once I disconnect from Redis, I can't reconnect to it. Same thing happens with HeidiSQL (I tested that just after the video stopped)

So, there's clearly some issue with opening and maintaining ports/connections between Devilbox/docker/wsl2 and Windows.

Everything is still accessible from within WSL2/Ubuntu/Docker/Devilbox - I can open ./shell.sh and access mysql, redis and do other php things.

Here's a screen recording of that (again, treat it as the same session - devilbox/docker was not reset)

https://user-images.githubusercontent.com/88559987/215154140-c1869ed2-0472-4860-8a6b-86e2b7085f6f.mp4

nickchomey commented 1 year ago

Another, perhaps related, question - is there any sort of NGINX server-side caching going on? Perhaps that might be contributing to some of the sporadic page-load stuff (though the front-end stuff is mostly dynamically generated via AJAX requests...)

cytopia commented 1 year ago

Have you checked the php and webserver error logs for anything suspicious?

nickchomey commented 1 year ago

@cytopia

Yes, I believe I mentioned this somewhere above and included some examples/details.

I see nothing whatsoever in the Docker logs - after the Devilbox starts up, the only entries I see while navigating look like this.

devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:15:46 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:15:56 +0000 "GET /wp-admin/edit.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:16:16 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:16:46 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:16:56 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:16:57 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:00 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:23 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:24 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:27 +0000 "GET /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:28 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:31 +0000 "GET /wp-admin/users.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:35 +0000 "GET /wp-admin/nav-menus.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:42 +0000 "GET /wp-admin/edit.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:42 +0000 "POST /wp-cron.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:43 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:45 +0000 "GET /wp-admin/edit.php" 200
devilbox-redis-1  | 1:M 27 Jan 2023 17:17:51.025 * 100 changes in 300 seconds. Saving...
devilbox-redis-1  | 1:M 27 Jan 2023 17:17:51.025 * Background saving started by pid 16
devilbox-redis-1  | 16:C 27 Jan 2023 17:17:51.057 * DB saved on disk
devilbox-redis-1  | 16:C 27 Jan 2023 17:17:51.057 * RDB: 2 MB of memory used by copy-on-write
devilbox-redis-1  | 1:M 27 Jan 2023 17:17:51.125 * Background saving terminated with success
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:53 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:55 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:56 +0000 "POST /wp-admin/admin-ajax.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:58 +0000 "GET /index.php" 200
devilbox-php-1    | 172.16.238.11 -  27/Jan/2023:17:17:59 +0000 "GET /index.php" 200
devilbox-redis-1  | 1:M 27 Jan 2023 17:22:52.061 * 100 changes in 300 seconds. Saving...
devilbox-redis-1  | 1:M 27 Jan 2023 17:22:52.062 * Background saving started by pid 17
devilbox-redis-1  | 17:C 27 Jan 2023 17:22:52.093 * DB saved on disk
devilbox-redis-1  | 17:C 27 Jan 2023 17:22:52.094 * RDB: 2 MB of memory used by copy-on-write
devilbox-redis-1  | 1:M 27 Jan 2023 17:22:52.162 * Background saving terminated with success

And the logs in /devilbox/log show nothing either (I've tried setting DOCKER_LOGS=1 and =0).

But it is entirely possible that I don't have logging configured properly or I'm not looking in the right place. I would have expected to see entries in the Docker log for httpd, bind, and mysql - especially since I set DEBUG_ENTRYPOINT=4 (and have also tried 1-3. They all look the EXACT same - perhaps the problem is related to that?)

I also just tried Apache 2.4 and PHP 7.4. Same problems exist. And Nothing shows up in the error logs. And there simply isn't a mariadb log at all.

nickchomey commented 1 year ago

I just reverted to v2.4.0 and i now see devilbox-httpd-1 in the docker logs, but still nothing for mysql.

But, still, no errors show up when things break.

nickchomey commented 1 year ago

I think I've discovered and fixed the problem. As some of my comments above presumed, it was an issue with WSL/Windows (the docker services still worked from within wsl, but not from Windows)

I found this issue and rolled back my version of WSL2.

wp4nuv commented 1 year ago

This may be off-topic, but I've seen something similar to what you describe, but with networking. PHP will begin to load, and then it fails when running apt update. docker compose down and restarting the stack works without issue. WSL 1.1.0 has not been offered to me in Windows 11. This may be unrelated, but I thought to share my experience, just in case someone else has seen this.

nickchomey commented 1 year ago

I have windows 11 insider beta, so that might be why. Though, if you install from the Windows store, you can get the latest version of wsl. But, obviously, I'd wait til 1.1.1 to fix this bug - it has messed a lot of people up. I lost dozens of hours to it and surely annoyed the devilbox Dev!