cytopia / devilbox

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

[Bug]: reverse proxy - 502 Bad Gateway nginx/1.21.6 - NodeJS #912

Closed frankroc2022 closed 2 years ago

frankroc2022 commented 2 years ago

Have you already looked into this bug?

(Optional) Error message

502 Bad Gateway nginx/1.21.6

What went wrong?

502 Bad Gateway nginx/1.21.6

Expected behaviour

Hello World to read.

How can we reproduce the bug?

Install Devilbox under Ubutu 22.04 setup auto dns and ssl and follow https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-nodejs.html

I changed

NODE_PROJECTS=( "/shared/httpd/my-node/js/index.js" )

to NODE_PROJECTS=( "/shared/httpd/my-node/index.js" )

Host Operating System

Linux

Host Platform (amd64, arm64, other)

amd64

(Linux only) Is SELinux enabled?

No, SELinux is disabled

Docker version

Docker version 20.10.12, build 20.10.12-0ubuntu4

Docker Compose version

docker-compose version 1.29.2, build unknown

Devilbox version

Devilbox v2.2.0 (2022-04-14)

Have you removed stopped containers before starting?

Yes

Have you pulled latest Docker images before starting?

Yes

Devilbox start command

docker-compose up httpd php bind

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: Quiet
### 1: Verbose
### 2: More verbose
DEBUG_COMPOSE_ENTRYPOINT=2

###
### 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=0

###
### 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.##
###
### Example:
###   TLD_SUFFIX=loc
### Makes your project available under xxxx.loc
###
### Example:
###   TLD_SUFFIX=local
### Makes your project available under xxxx.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

################################################################################
###
### 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

###
### 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=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=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
HOST_PATH_HTTPD_DATADIR=/home/frank/workspace/web

###
### 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

###
### 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=5173
HOST_PORT_HTTPD_SSL=443
##HOST_PORT_HTTPD_SSL=5183

###
### 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

###
### Webserver timeout (in seconds) to upstream PHP-FPM server
###
### 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_TIMEOUT_TO_PHP_FPM=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=53

###
### 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

Config: docker-compose.override.yml

No response

Config: ./check-config.sh

# ==============================================================================
# Checking git
# ==============================================================================
[SUCC]  git is clean

# ==============================================================================
# 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
# ==============================================================================
[SUCC]  All .env file variables have correct values

# ==============================================================================
# Checking required Devilbox core directories exist
# ==============================================================================
[SUCC]  All PHP cfg/ sub directories are present
[SUCC]  All PHP log/ sub directories are present
[SUCC]  All PHP mod/ 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]  [vhost-gen]  Custom Apache 2.2 vhost-gen config present in: /home/frank/workspace/web/my-node/
find: ‘cfg/mariadb-10.8’: No such file or directory
[NOTE]  [startup]    Custom script present in autostart/

# ==============================================================================
# SUMMARY
# ==============================================================================
[SUCC]  Found no errors
[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

Attaching to devilbox_httpd_1, devilbox_php_1, devilbox_bind_1
bind_1   | [INFO] Debug level: 2
bind_1   | 
bind_1   | --------------------------------------------------------------------------------
bind_1   | /etc/bind/named.conf
bind_1   | --------------------------------------------------------------------------------
bind_1   | include "/etc/bind/named.conf.logging";
bind_1   | include "/etc/bind/named.conf.options";
bind_1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bind_1   | [INFO] BIND logging: disabled explicitly
bind_1   | [INFO] Using default DNS TTL time: 3600 sec
bind_1   | [INFO] Using default DNS Refresh time: 1200 sec
bind_1   | [INFO] Using default DNS Retry time: 180 sec
bind_1   | [INFO] Using default DNS Expiry time: 1209600 sec
bind_1   | [INFO] Using default DNS Max Cache time: 10800 sec
bind_1   | [INFO] Not adding any PTR records
bind_1   | [INFO] Adding A Record: *.loc -> 127.0.0.1
bind_1   | zone rpz/IN: loaded serial 1660562547
bind_1   | OK
bind_1   | [INFO] Not adding any CNAME records
bind_1   | [INFO] $ALLOW_QUERY not set.
bind_1   | [INFO] DNS query rules will not be set
bind_1   | [INFO] $ALLOW_RECURSION not set.
bind_1   | [INFO] DNS recursion rules will not be set
bind_1   | [INFO] DNSSEC Validation: no
bind_1   | [INFO] Adding custom DNS forwarder: 8.8.8.8,8.8.4.4
bind_1   | 
bind_1   | --------------------------------------------------------------------------------
bind_1   | /etc/bind/named.conf.options
bind_1   | --------------------------------------------------------------------------------
bind_1   | options {
bind_1   |     directory "/var/cache/bind";
bind_1   |     dnssec-validation no;
bind_1   |     auth-nxdomain no;    # conform to RFC1035
bind_1   |     listen-on-v6 { any; };
bind_1   |     response-policy { zone "rpz"; };
bind_1   |     forwarders {
bind_1   |         8.8.8.8;
bind_1   |         8.8.4.4;
bind_1   |     };
bind_1   | };
bind_1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bind_1   | 
bind_1   | --------------------------------------------------------------------------------
bind_1   | /etc/bind/custom/conf/rpz.conf
bind_1   | --------------------------------------------------------------------------------
bind_1   | zone "rpz" IN {
bind_1   |     type master;
bind_1   |     allow-transfer { any; };
bind_1   |     allow-update { any; };
bind_1   |     file "/etc/bind/custom/zone/rpz";
bind_1   | };
bind_1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bind_1   | 
bind_1   | --------------------------------------------------------------------------------
bind_1   | /etc/bind/custom/zone/rpz
bind_1   | --------------------------------------------------------------------------------
bind_1   | $TTL 3600
bind_1   | @                               IN   SOA     bind. admin.bind. (
bind_1   |                                              1660562547     ; Serial number
bind_1   |                                              1200           ; Refresh time
bind_1   |                                              180            ; Retry time
bind_1   |                                              1209600        ; Expiry time
bind_1   |                                              10800          ; Negative Cache TTL
bind_1   | )
bind_1   | 
bind_1   | ; NS Records
bind_1   |                                 IN   NS      bind.
bind_1   | 
bind_1   | ; Custom Records
bind_1   | *.loc                           IN   A       127.0.0.1
bind_1   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bind_1   | [INFO] Starting BIND 9.16.29
httpd_1  | [INFO] Debug level: 2
httpd_1  | [INFO] Runtime debug: 2
httpd_1  | [INFO] Changing user 'nginx' uid to: 1000
httpd_1  | root $ usermod -u 1000 nginx
httpd_1  | [INFO] Changing group 'nginx' gid to: 1000
httpd_1  | root $ groupmod -g 1000 nginx
httpd_1  | [INFO] Setting container timezone to: UTC
httpd_1  | root $ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
httpd_1  | [INFO] Docker date set to: Mon Aug 15 11:22:28 UTC 2022
httpd_1  | [INFO] $WORKER_PROCESSES set to its default value: 'auto'.
httpd_1  | root $ sed -i'' 's/__WORKER_PROCESSES__/auto/g' /etc/nginx/nginx.conf
httpd_1  | [INFO] Setting worker_connections to: 1024
httpd_1  | root $ sed -i'' 's/__WORKER_CONNECTIONS__/1024/g' /etc/nginx/nginx.conf
httpd_1  | [INFO] $DOCKER_LOGS disabled. Logging errors and access to log files inside container.
httpd_1  | [INFO] PHP-FPM: Enabled
httpd_1  | [INFO] PHP-FPM: Server address: 172.16.238.10
httpd_1  | [INFO] PHP-FPM: Server port: 9000
httpd_1  | [INFO] PHP-FPM: Timeout: 180
httpd_1  | [INFO] http2: Enabled
httpd_1  | [INFO] Main vhost: Enabled
httpd_1  | [INFO] Main vhost: Setting SSL type to: http and https
httpd_1  | [INFO] Main vhost: Enable automatic generation of SSL certificates
httpd_1  | [INFO] Main vhost: SSL CN: localhost,*.localhost,devilbox,*.devilbox,httpd
httpd_1  | [INFO] $MAIN_VHOST_DOCROOT not specified. Keeping default: htdocs
httpd_1  | [INFO] $MAIN_VHOST_TPL not specified. Keeping default: cfg
httpd_1  | [INFO] Main vhost: Enabling httpd status page
httpd_1  | [INFO] Main vhost: Changing status page alias to: /devilbox-httpd-status
httpd_1  | [INFO] Mass vhost: Enabled
httpd_1  | [INFO] Mass vhost: Setting SSL type to: http and https
httpd_1  | [INFO] Mass vhost: Enable automatic generation of SSL certificates
httpd_1  | [INFO] Mass vhost: changing tld to: .loc
httpd_1  | [INFO] Mass vhost: changing document root to: htdocs
httpd_1  | [INFO] Mass vhost: changing template dir to: .devilbox
httpd_1  | [INFO] vhost-gen: no customized template found
httpd_1  | root $ sed -i'' 's/__PHP_ENABLE__/yes/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_ADDR__/172.16.238.10/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_PORT__/9000/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_TIMEOUT__/180/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__PHP_ENABLE__/yes/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__PHP_ADDR__/172.16.238.10/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__PHP_PORT__/9000/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__PHP_TIMEOUT__/180/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ERROR__/no/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ACCESS__/no/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ERROR__/no/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__DOCKER_LOGS_ACCESS__/no/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__HTTP2_ENABLE__/True/g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's/__HTTP2_ENABLE__/True/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's|__ENABLE_STATUS__|yes|g' /etc/vhost-gen/main.yml
httpd_1  | root $ sed -i'' 's|__STATUS_ALIAS__|/devilbox-httpd-status|g' /etc/vhost-gen/main.yml
httpd_1  | root $ vhost-gen -n localhost -p /var/www/default/htdocs -t /etc/vhost-gen/templates-main/ -c /etc/vhost-gen/main.yml -o /var/www/default/cfg -v -d -s -m both
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Loading configuration file        (-c): /etc/vhost-gen/main.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Loading vhost template (global)   (-t): /etc/vhost-gen/templates-main/nginx.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Loading vhost template (override) (-o): /var/www/default/cfg/nginx.yml
httpd_1  | vhost-gen: [WARN]  (2022-08-15 11:22:28): Override Vhost template not found: /var/www/default/cfg/nginx.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Creating vhost type: https and http (both)
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Using vhost name: localhost
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Log setting: dir -> True
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Log setting: Not specified
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:28): Vhost config written to: /etc/httpd/conf.d/localhost.conf
httpd_1  | root $ sed -i'' 's|__DOCROOT_SUFFIX__|htdocs|g' /etc/vhost-gen/mass.yml
httpd_1  | root $ sed -i'' 's/__TLD__/.loc/g' /etc/vhost-gen/mass.yml
httpd_1  | root $ mkdir -p /etc/httpd/cert/main
httpd_1  | root $ 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
httpd_1  | $ openssl req -newkey rsa:2048 -sha256 -nodes -extensions v3_req -config <(echo "[req]
httpd_1  | distinguished_name = req_distinguished_name
httpd_1  | x509_extensions = v3_req
httpd_1  | 
httpd_1  | [req_distinguished_name]
httpd_1  | 
httpd_1  | [ v3_req ]
httpd_1  | basicConstraints = critical, CA:FALSE
httpd_1  | subjectKeyIdentifier = hash
httpd_1  | keyUsage = critical, digitalSignature, keyEncipherment
httpd_1  | authorityKeyIdentifier = keyid:always,issuer:always
httpd_1  | extendedKeyUsage = serverAuth, clientAuth
httpd_1  | subjectAltName=${ALT_NAMES}") -keyout /etc/httpd/cert/main/localhost.key -subj '/C=DE/ST=Berlin/L=Berlin/O=Devilbox/OU=Devilbox/CN=localhost/emailAddress=admin@localhost' -out /etc/httpd/cert/main/localhost.csr
httpd_1  | $ openssl x509 -req -sha256 -extensions v3_req -extfile <(echo "[req]
httpd_1  | distinguished_name = req_distinguished_name
httpd_1  | x509_extensions = v3_req
httpd_1  | 
httpd_1  | [req_distinguished_name]
httpd_1  | 
httpd_1  | [ v3_req ]
httpd_1  | basicConstraints = critical, CA:FALSE
httpd_1  | subjectKeyIdentifier = hash
httpd_1  | keyUsage = critical, digitalSignature, keyEncipherment
httpd_1  | authorityKeyIdentifier = keyid:always,issuer:always
httpd_1  | extendedKeyUsage = serverAuth, clientAuth
httpd_1  | subjectAltName=${ALT_NAMES}") -days 825 -in /etc/httpd/cert/main/localhost.csr -CA /ca/devilbox-ca.crt -CAkey /ca/devilbox-ca.key -CAcreateserial -out /etc/httpd/cert/main/localhost.crt
httpd_1  | Certificate:
httpd_1  |     Data:
httpd_1  |         Version: 3 (0x2)
httpd_1  |         Serial Number:
httpd_1  |             45:19:dc:4c:2b:5b:4f:f1:44:14:19:3e:95:4b:1f:7a:16:95:4f:9f
httpd_1  |         Signature Algorithm: sha256WithRSAEncryption
httpd_1  |         Issuer: C = DE, ST = Berlin, L = Berlin, O = Devilbox, OU = Devilbox, CN = Devilbox Root CA, emailAddress = cytopia@devilbox.org, dnQualifier = "+hJP0+vW2D/J3tJn0a8N4xuhpfU="
httpd_1  |         Validity
httpd_1  |             Not Before: Aug 15 11:22:29 2022 GMT
httpd_1  |             Not After : Nov 17 11:22:29 2024 GMT
httpd_1  |         Subject: C = DE, ST = Berlin, L = Berlin, O = Devilbox, OU = Devilbox, CN = localhost, emailAddress = admin@localhost
httpd_1  |         Subject Public Key Info:
httpd_1  |             Public Key Algorithm: rsaEncryption
httpd_1  |                 RSA Public-Key: (2048 bit)
httpd_1  |                 Modulus:
httpd_1  |                     00:ba:f9:d8:1b:12:48:b4:03:8c:39:e9:fb:80:1f:
httpd_1  |                     a8:d5:a2:8d:a6:69:80:88:95:e3:3d:28:5e:80:53:
httpd_1  |                     41:49:11:97:6e:15:4d:35:4f:90:fb:b2:72:a0:d0:
httpd_1  |                     43:22:37:cf:29:aa:e6:db:ea:1e:a3:6b:c1:83:c0:
httpd_1  |                     e6:75:51:4a:bd:d5:6d:c6:84:e8:8c:3e:fd:4d:d0:
httpd_1  |                     c4:54:e6:69:b4:9a:b3:60:d0:c4:0a:49:1c:8e:43:
httpd_1  |                     77:11:bc:10:35:c6:16:eb:4a:f1:f9:28:47:d4:f2:
httpd_1  |                     c8:66:99:0e:e4:7e:15:29:a7:72:87:ba:a7:f4:d7:
httpd_1  |                     e7:b4:11:0f:4f:aa:a4:0f:6c:c4:2d:52:80:fe:2c:
httpd_1  |                     f2:43:dc:27:c4:13:4e:65:8e:15:f6:e8:38:b3:10:
httpd_1  |                     a1:69:a8:b5:dd:44:bb:de:97:07:e2:e8:1f:ca:8e:
httpd_1  |                     da:31:3f:dc:63:b9:58:ab:b9:7d:98:f6:cc:83:f9:
httpd_1  |                     b6:28:ac:ad:e7:6b:c5:95:c4:f5:32:49:9d:31:59:
httpd_1  |                     7c:6d:a1:4b:79:df:f8:a1:91:ac:22:37:f1:c7:66:
httpd_1  |                     96:bc:70:1f:1f:5e:38:6a:0e:03:ee:7d:d9:4e:18:
httpd_1  |                     58:15:9c:e2:03:34:f7:92:72:c5:12:19:61:d3:d7:
httpd_1  |                     81:3b:6d:db:ed:85:e0:39:cd:74:06:9f:96:bf:f8:
httpd_1  |                     20:1b
httpd_1  |                 Exponent: 65537 (0x10001)
httpd_1  |         X509v3 extensions:
httpd_1  |             X509v3 Basic Constraints: critical
httpd_1  |                 CA:FALSE
httpd_1  |             X509v3 Subject Key Identifier: 
httpd_1  |                 8E:5D:03:A1:FC:97:AE:AA:1C:EE:F8:80:18:43:00:6D:03:78:E5:F4
httpd_1  |             X509v3 Key Usage: critical
httpd_1  |                 Digital Signature, Key Encipherment
httpd_1  |             X509v3 Authority Key Identifier: 
httpd_1  |                 keyid:FA:12:4F:D3:EB:D6:D8:3F:C9:DE:D2:67:D1:AF:0D:E3:1B:A1:A5:F5
httpd_1  |                 DirName:/C=DE/ST=Berlin/L=Berlin/O=Devilbox/OU=Devilbox/CN=Devilbox Root CA/emailAddress=cytopia@devilbox.org/dnQualifier=+hJP0+vW2D/J3tJn0a8N4xuhpfU=
httpd_1  |                 serial:17:21:A7:C0:8D:5F:A4:74:E4:B4:7C:9F:2E:FA:5D:16:3C:7E:43:BC
httpd_1  | 
httpd_1  |             X509v3 Extended Key Usage: 
httpd_1  |                 TLS Web Server Authentication, TLS Web Client Authentication
httpd_1  |             X509v3 Subject Alternative Name: 
httpd_1  |                 DNS:localhost, DNS:localhost, DNS:*.localhost, DNS:devilbox, DNS:*.devilbox, DNS:httpd
httpd_1  |     Signature Algorithm: sha256WithRSAEncryption
httpd_1  |          83:66:d4:bc:fb:bb:d6:87:8b:8b:bf:30:48:24:f8:71:e5:17:
httpd_1  |          a6:61:d6:df:c2:8e:02:eb:e9:30:f4:ff:3c:8f:cc:96:8d:64:
httpd_1  |          b3:d4:f8:42:50:77:89:f7:d3:05:d2:36:bb:a2:2c:df:b3:d7:
httpd_1  |          75:11:7f:de:78:15:53:31:0f:c0:15:c9:bc:08:95:11:f2:7f:
httpd_1  |          36:76:e1:d8:2c:9b:e2:7e:56:66:ed:2e:17:8f:d9:ac:e2:27:
httpd_1  |          54:c1:09:cd:cf:7d:83:c7:87:e5:83:d1:0a:9d:85:5a:24:01:
httpd_1  |          b2:bc:e6:80:b0:ca:29:e8:ad:b1:16:9c:67:aa:08:21:96:74:
httpd_1  |          58:5f:d9:98:c0:d9:ff:d7:18:60:83:fd:e2:d9:ee:ab:af:f7:
httpd_1  |          37:d5:62:dc:ab:77:57:bd:e5:f5:63:2e:21:66:7e:c7:b5:4d:
httpd_1  |          96:15:57:d0:9d:75:c8:20:2e:fb:a5:50:8a:07:5d:b2:d0:66:
httpd_1  |          cf:2f:0f:c2:cd:5e:f7:18:c9:2a:c4:fb:84:b7:d2:4a:d8:07:
httpd_1  |          85:01:d9:91:61:df:8c:cf:2a:03:5c:7f:65:a8:4c:28:5f:16:
httpd_1  |          e0:54:bc:5e:de:d1:6c:81:36:db:b5:93:9c:33:68:28:b0:48:
httpd_1  |          13:d3:e5:65:ad:79:f9:03:78:5e:89:d1:ad:9b:4b:cb:bd:ce:
httpd_1  |          30:da:0a:1c
httpd_1  | /etc/httpd/cert/main/localhost.crt: OK
httpd_1  | root $ chown -R 1000:1000 /ca
httpd_1  | [INFO] Starting supervisord: 4.2.2
httpd_1  | 2022-08-15 11:22:29,296 INFO Set uid to user 0 succeeded
httpd_1  | 2022-08-15 11:22:29,297 INFO supervisord started with pid 1
httpd_1  | 2022-08-15 11:22:30,300 INFO spawned: 'httpd' with pid 177
httpd_1  | 2022-08-15 11:22:30,302 INFO spawned: 'watcherd' with pid 178
httpd_1  | 2022-08-15 11:22:31,304 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
httpd_1  | 2022-08-15 11:22:31,304 INFO success: watcherd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
httpd_1  | watcherd: [2022-08-15 11:22:33] Starting daemon.
httpd_1  | $ openssl req -newkey rsa:2048 -sha256 -nodes -extensions v3_req -config <(echo "[req]
httpd_1  | distinguished_name = req_distinguished_name
httpd_1  | x509_extensions = v3_req
httpd_1  | 
httpd_1  | [req_distinguished_name]
httpd_1  | 
httpd_1  | [ v3_req ]
httpd_1  | basicConstraints = critical, CA:FALSE
httpd_1  | subjectKeyIdentifier = hash
httpd_1  | keyUsage = critical, digitalSignature, keyEncipherment
httpd_1  | authorityKeyIdentifier = keyid:always,issuer:always
httpd_1  | extendedKeyUsage = serverAuth, clientAuth
httpd_1  | subjectAltName=${ALT_NAMES}") -keyout /etc/httpd/cert/mass/my-node.loc.key -subj '/C=DE/ST=Berlin/L=Berlin/O=Devilbox/OU=Devilbox/CN=my-node.loc/emailAddress=admin@my-node.loc' -out /etc/httpd/cert/mass/my-node.loc.csr
httpd_1  | $ openssl x509 -req -sha256 -extensions v3_req -extfile <(echo "[req]
httpd_1  | distinguished_name = req_distinguished_name
httpd_1  | x509_extensions = v3_req
httpd_1  | 
httpd_1  | [req_distinguished_name]
httpd_1  | 
httpd_1  | [ v3_req ]
httpd_1  | basicConstraints = critical, CA:FALSE
httpd_1  | subjectKeyIdentifier = hash
httpd_1  | keyUsage = critical, digitalSignature, keyEncipherment
httpd_1  | authorityKeyIdentifier = keyid:always,issuer:always
httpd_1  | extendedKeyUsage = serverAuth, clientAuth
httpd_1  | subjectAltName=${ALT_NAMES}") -days 825 -in /etc/httpd/cert/mass/my-node.loc.csr -CA /ca/devilbox-ca.crt -CAkey /ca/devilbox-ca.key -CAcreateserial -out /etc/httpd/cert/mass/my-node.loc.crt
httpd_1  | Certificate:
httpd_1  |     Data:
httpd_1  |         Version: 3 (0x2)
httpd_1  |         Serial Number:
httpd_1  |             45:19:dc:4c:2b:5b:4f:f1:44:14:19:3e:95:4b:1f:7a:16:95:4f:a0
httpd_1  |         Signature Algorithm: sha256WithRSAEncryption
httpd_1  |         Issuer: C = DE, ST = Berlin, L = Berlin, O = Devilbox, OU = Devilbox, CN = Devilbox Root CA, emailAddress = cytopia@devilbox.org, dnQualifier = "+hJP0+vW2D/J3tJn0a8N4xuhpfU="
httpd_1  |         Validity
httpd_1  |             Not Before: Aug 15 11:22:33 2022 GMT
httpd_1  |             Not After : Nov 17 11:22:33 2024 GMT
httpd_1  |         Subject: C = DE, ST = Berlin, L = Berlin, O = Devilbox, OU = Devilbox, CN = my-node.loc, emailAddress = admin@my-node.loc
httpd_1  |         Subject Public Key Info:
httpd_1  |             Public Key Algorithm: rsaEncryption
httpd_1  |                 RSA Public-Key: (2048 bit)
httpd_1  |                 Modulus:
httpd_1  |                     00:df:23:3c:16:6b:d9:ba:3d:8f:66:85:30:17:7b:
httpd_1  |                     ee:3d:ba:18:60:4c:74:dd:0d:0c:63:ec:0c:a0:02:
httpd_1  |                     f8:15:45:f5:29:59:80:f6:13:ef:40:e6:2c:7f:b9:
httpd_1  |                     61:31:63:4b:6e:ab:01:74:6b:78:b6:2e:d7:01:25:
httpd_1  |                     fa:b4:51:68:ff:91:8a:85:40:a9:25:0f:9d:ab:fd:
httpd_1  |                     a3:ae:4d:4b:6f:0c:50:ad:66:2e:6c:51:2c:a9:83:
httpd_1  |                     ad:06:8d:e8:1d:d0:da:9a:d2:56:00:72:7a:50:f6:
php_1    | [INFO] Debug level: 2
php_1    | [INFO] Changing user 'devilbox' uid to: 1000
php_1    | root $ usermod -u 1000 devilbox 2>/dev/null
php_1    | usermod: no changes
php_1    | root $ chown -R devilbox /home/devilbox 2>/dev/null || true
php_1    | root $ chown -R devilbox /var/lib/php/session
php_1    | root $ chown -R devilbox /var/lib/php/wsdlcache
php_1    | root $ chown -R devilbox /var/spool/mail/devilbox
php_1    | root $ chown -R devilbox /etc/supervisor/custom.d
php_1    | [INFO] Changing group 'devilbox' gid to: 1000
php_1    | root $ groupmod -g 1000 devilbox 2>/dev/null
php_1    | root $ chown -R :devilbox /home/devilbox 2>/dev/null || true
php_1    | root $ chown -R :devilbox /var/lib/php/session
php_1    | root $ chown -R :devilbox /var/lib/php/wsdlcache
php_1    | root $ chown -R :devilbox /var/spool/mail/devilbox
php_1    | root $ chown -R :devilbox /etc/supervisor/custom.d
php_1    | [INFO] Setting container timezone to: UTC
php_1    | root $ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
php_1    | [INFO] Setting PHP: timezone=UTC
php_1    | root $ echo 'date.timezone = UTC' > /usr/local/etc/php/conf.d/devilbox-runtime-timezone.ini
php_1    | [INFO] Docker date set to: Mon Aug 15 11:22:28 UTC 2022
php_1    | [INFO] $DOCKER_LOGS set to 0. Logging to files under: /var/log/php
php_1    | [INFO] Make sure to mount this directory in order to view logs
php_1    | root $ chown -R devilbox:devilbox /var/log/php
php_1    | root $ chmod 0755 /var/log/php
php_1    | [INFO] $ENABLE_MAIL set to 2. Enabling postfix catch-all
php_1    | root $ chown devilbox:devilbox /var/log/php
php_1    | root $ chown devilbox:devilbox /var/log/php/mail.log
php_1    | root $ chmod 0644 /var/log/php/mail.log
php_1    | root $ chmod 0644 /var/mail/devilbox
php_1    | root $ chown devilbox:devilbox /var/mail
php_1    | root $ chown devilbox:devilbox /var/mail/devilbox
php_1    | root $ postconf -e 'strict_mailbox_ownership=no'
php_1    | root $ postconf -e 'inet_protocols=ipv4'
php_1    | root $ postconf -e 'myhostname=localhost'
php_1    | root $ postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'
php_1    | root $ echo '/.*@.*/ devilbox' >> /etc/postfix/virtual
php_1    | root $ newaliases
php_1    | [INFO] Forwarding httpd:80 to 127.0.0.1:80 inside this docker.
php_1    | [INFO] Forwarding httpd:443 to 127.0.0.1:443 inside this docker.
php_1    | [INFO] Forwarding mysql:3306 to 127.0.0.1:3306 inside this docker.
php_1    | [INFO] Forwarding pgsql:5432 to 127.0.0.1:5432 inside this docker.
php_1    | [INFO] Forwarding redis:6379 to 127.0.0.1:6379 inside this docker.
php_1    | [INFO] Forwarding memcd:11211 to 127.0.0.1:11211 inside this docker.
php_1    | [INFO] Forwarding mongo:27017 to 127.0.0.1:27017 inside this docker.
php_1    | [INFO] Enabling 'socat-80-httpd-80' to be started by supervisord
php_1    | [INFO] Enabling 'socat-443-httpd-443' to be started by supervisord
php_1    | [INFO] Enabling 'socat-3306-mysql-3306' to be started by supervisord
php_1    | [INFO] Enabling 'socat-5432-pgsql-5432' to be started by supervisord
php_1    | [INFO] Enabling 'socat-6379-redis-6379' to be started by supervisord
php_1    | [INFO] Enabling 'socat-11211-memcd-11211' to be started by supervisord
php_1    | [INFO] Enabling 'socat-27017-mongo-27017' to be started by supervisord
php_1    | [INFO] Enabling 'rsyslogd' to be started by supervisord
php_1    | [INFO] Enabling 'postfix' to be started by supervisord
php_1    | [INFO] Enabling 'php-fpm' to be started by supervisord
php_1    | root $ find /usr/local/etc/php/conf.d -type f -iname '*.ini' -exec chmod 0644 "{}" \;
php_1    | root $ find /usr/local/etc/php-fpm.d -type f -iname '*.conf' -exec chmod 0644 "{}" \;
php_1    | [INFO] $ENABLE_MODULES set, but empty. Not enabling any PHP modules.
php_1    | [INFO] Disabling the following PHP modules: oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
php_1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini
php_1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-pdo_sqlsrv.ini
php_1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-sqlsrv.ini
php_1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-rdkafka.ini
php_1    | root $ rm /usr/local/etc/php/conf.d/docker-php-ext-swoole.ini
php_1    | root $ chown devilbox:devilbox /etc/mysqldump-secure.conf
php_1    | root $ chown devilbox:devilbox /etc/mysqldump-secure.cnf
php_1    | root $ chown devilbox:devilbox /var/log/mysqldump-secure.log
php_1    | root $ chown devilbox:devilbox /shared/backups/mysql
php_1    | [INFO] $MYSQL_BACKUP_USER set for mysqldump-secure. Changing to 'root'
php_1    | root $ sed -i'' 's/^user.*/user = root/g' /etc/mysqldump-secure.cnf
php_1    | [INFO] $MYSQL_BACKUP_PASS set for mysqldump-secure. Changing to '******'
php_1    | root $ perl -pi -e 's/^password.*/password = /g' /etc/mysqldump-secure.cnf
php_1    | [INFO] $MYSQL_BACKUP_HOST set for mysqldump-secure. Changing to 'mysql'
php_1    | root $ sed -i'' 's/^host.*/host = mysql/g' /etc/mysqldump-secure.cnf
php_1    | root $ chown devilbox:devilbox /shared/backups
php_1    | root $ chown devilbox:devilbox /shared/httpd
php_1    | root $ chmod 0755 /shared/backups
php_1    | root $ chmod 0755 /shared/httpd
php_1    | root $ cp /ca/devilbox-ca.crt /usr/local/share/ca-certificates/devilbox-devilbox-ca.crt
php_1    | root $ update-ca-certificates
php_1    | Updating certificates in /etc/ssl/certs...
php_1    | 1 added, 0 removed; done.
php_1    | Running hooks in /etc/ca-certificates/update.d...
php_1    | done.
php_1    | [INFO] Executing custom startup script: run-node-js-projects.sh
php_1    | [Warning], skipping startup, file does not exist: /shared/httpd/my-node/index.js
php_1    | [INFO] Starting supervisord
php_1    | 2022-08-15 11:22:31,511 WARN No file matches via include "/etc/supervisor/custom.d/*.conf"
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/php-fpm.conf" during parsing
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/postfix.conf" during parsing
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/rsyslogd.conf" during parsing
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/socat-11211-memcd-11211.conf" during parsing
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/socat-27017-mongo-27017.conf" during parsing
httpd_1  |                     d0:3f:05:de:7a:24:65:fc:be:d8:ac:c5:27:2a:e6:
httpd_1  |                     4e:f1:6b:20:f7:25:8a:b7:d3:98:39:1a:d4:e9:db:
httpd_1  |                     b4:d4:99:9e:68:c8:ca:ae:e9:7f:ef:5f:98:d4:1a:
httpd_1  |                     10:18:12:7c:2e:9d:c2:3b:a3:44:e4:c9:e7:f3:11:
httpd_1  |                     9f:1b:72:4b:32:4d:39:20:17:9c:b2:4c:12:56:7a:
httpd_1  |                     2a:0a:20:1e:41:4e:ec:eb:55:9c:8f:82:c3:bd:fb:
httpd_1  |                     ec:73:4d:fd:0a:49:42:bb:0e:a2:1a:32:31:52:08:
httpd_1  |                     a1:bd:e1:24:b7:32:c6:c6:6b:f2:aa:47:d4:ed:b4:
httpd_1  |                     5e:17:57:72:11:8c:40:29:ae:c9:0e:33:23:2b:ef:
httpd_1  |                     13:da:17:a2:98:56:9f:a3:a0:17:38:6b:4d:19:d1:
httpd_1  |                     21:7f
httpd_1  |                 Exponent: 65537 (0x10001)
httpd_1  |         X509v3 extensions:
httpd_1  |             X509v3 Basic Constraints: critical
httpd_1  |                 CA:FALSE
httpd_1  |             X509v3 Subject Key Identifier: 
httpd_1  |                 CC:D8:AA:07:FC:AC:45:C1:82:9D:BE:8A:DB:3A:D5:A9:9F:15:A8:3E
httpd_1  |             X509v3 Key Usage: critical
httpd_1  |                 Digital Signature, Key Encipherment
httpd_1  |             X509v3 Authority Key Identifier: 
httpd_1  |                 keyid:FA:12:4F:D3:EB:D6:D8:3F:C9:DE:D2:67:D1:AF:0D:E3:1B:A1:A5:F5
httpd_1  |                 DirName:/C=DE/ST=Berlin/L=Berlin/O=Devilbox/OU=Devilbox/CN=Devilbox Root CA/emailAddress=cytopia@devilbox.org/dnQualifier=+hJP0+vW2D/J3tJn0a8N4xuhpfU=
httpd_1  |                 serial:17:21:A7:C0:8D:5F:A4:74:E4:B4:7C:9F:2E:FA:5D:16:3C:7E:43:BC
httpd_1  | 
httpd_1  |             X509v3 Extended Key Usage: 
httpd_1  |                 TLS Web Server Authentication, TLS Web Client Authentication
httpd_1  |             X509v3 Subject Alternative Name: 
httpd_1  |                 DNS:my-node.loc, DNS:*.my-node.loc
httpd_1  |     Signature Algorithm: sha256WithRSAEncryption
httpd_1  |          23:dc:54:f2:9c:3f:86:ca:1d:80:3d:1e:b9:fa:14:00:f0:5b:
httpd_1  |          92:e4:3c:f0:5a:db:fb:57:5a:31:5a:c1:5e:38:26:db:e1:98:
httpd_1  |          52:92:72:50:fc:b0:36:cf:8f:6c:00:a4:92:39:01:e5:36:c1:
httpd_1  |          8a:95:68:fe:76:2c:3d:4d:c6:8b:30:b3:1c:32:f5:31:21:9b:
httpd_1  |          cd:c2:f8:7b:2f:6d:ff:a3:31:1b:b5:52:e4:6c:a4:14:7a:15:
httpd_1  |          db:a8:74:9f:00:19:cb:1f:c8:cb:d1:39:1e:13:14:47:65:7e:
httpd_1  |          70:26:19:2c:18:9c:f8:d4:6b:8b:8a:ee:58:34:16:7a:fa:10:
httpd_1  |          9d:e1:62:d4:8a:44:97:4a:2f:71:91:8b:d2:5d:da:78:76:77:
httpd_1  |          4f:c5:63:d7:a0:8b:82:51:71:b9:c1:50:e0:a0:7a:75:17:f2:
httpd_1  |          13:45:2b:26:09:33:17:58:b1:0b:c3:e0:b8:0f:a9:0e:2d:a5:
httpd_1  |          40:17:9d:9d:3b:70:58:b4:d8:1c:72:2b:40:e0:47:42:8b:56:
httpd_1  |          53:fa:47:f6:5e:5c:8e:89:b2:fa:29:4b:54:ca:32:1e:10:ff:
httpd_1  |          8d:ac:c7:2a:11:e5:d9:cb:68:11:e1:07:ab:93:3b:4b:e2:92:
httpd_1  |          ec:93:93:6e:eb:44:a3:a2:59:47:a4:c7:60:0c:2d:e1:1b:a7:
httpd_1  |          bd:f0:2e:87
httpd_1  | /etc/httpd/cert/mass/my-node.loc.crt: OK
httpd_1  | $ vhost-gen -p "/shared/httpd/my-node" -n "my-node" -c /etc/vhost-gen/mass.yml -o "/shared/httpd/my-node/.devilbox/" -s -v -m both
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Loading configuration file        (-c): /etc/vhost-gen/mass.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Loading vhost template (global)   (-t): /etc/vhost-gen/templates/nginx.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Loading vhost template (override) (-o): /shared/httpd/my-node/.devilbox/nginx.yml
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Creating vhost type: https and http (both)
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Using vhost name: my-node.loc
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Log setting: dir -> True
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Log setting: Not specified
httpd_1  | vhost-gen: [INFO]  (2022-08-15 11:22:33): Vhost config written to: /etc/httpd/vhost.d/my-node.conf
httpd_1  | watcherd: [2022-08-15 11:22:33] [OK]  ADD: succeeded: /shared/httpd/my-node
httpd_1  | 2022/08/15 11:22:33 [notice] 218#218: signal process started
httpd_1  | watcherd: [2022-08-15 11:22:33] [OK]  TRIGGER succeeded: nginx -s stop
httpd_1  | watcherd: [2022-08-15 11:22:33] Using bash loop to watch for changes.
httpd_1  | 2022-08-15 11:22:33,451 INFO exited: httpd (exit status 0; expected)
httpd_1  | 2022-08-15 11:22:34,453 INFO spawned: 'httpd' with pid 251
httpd_1  | 2022-08-15 11:22:35,456 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:31,511 INFO Included extra file "/etc/supervisor/conf.d/socat-3306-mysql-3306.conf" during parsing
php_1    | 2022-08-15 11:22:31,512 INFO Included extra file "/etc/supervisor/conf.d/socat-443-httpd-443.conf" during parsing
php_1    | 2022-08-15 11:22:31,512 INFO Included extra file "/etc/supervisor/conf.d/socat-5432-pgsql-5432.conf" during parsing
php_1    | 2022-08-15 11:22:31,512 INFO Included extra file "/etc/supervisor/conf.d/socat-6379-redis-6379.conf" during parsing
php_1    | 2022-08-15 11:22:31,512 INFO Included extra file "/etc/supervisor/conf.d/socat-80-httpd-80.conf" during parsing
php_1    | 2022-08-15 11:22:31,512 INFO Set uid to user 0 succeeded
php_1    | 2022-08-15 11:22:31,513 INFO supervisord started with pid 1
php_1    | 2022-08-15 11:22:32,515 INFO spawned: 'rsyslogd' with pid 1486
php_1    | 2022-08-15 11:22:32,516 INFO spawned: 'php-fpm' with pid 1487
php_1    | 2022-08-15 11:22:32,517 INFO spawned: 'postfix' with pid 1488
php_1    | 2022-08-15 11:22:32,517 INFO spawned: 'socat-11211-memcd-11211' with pid 1489
php_1    | 2022-08-15 11:22:32,518 INFO spawned: 'socat-27017-mongo-27017' with pid 1490
php_1    | 2022-08-15 11:22:32,519 INFO spawned: 'socat-3306-mysql-3306' with pid 1491
php_1    | 2022-08-15 11:22:32,519 INFO spawned: 'socat-443-httpd-443' with pid 1492
php_1    | 2022-08-15 11:22:32,520 INFO spawned: 'socat-5432-pgsql-5432' with pid 1493
php_1    | 2022-08-15 11:22:32,521 INFO spawned: 'socat-6379-redis-6379' with pid 1494
php_1    | 2022-08-15 11:22:32,521 INFO spawned: 'socat-80-httpd-80' with pid 1495
php_1    | 2022-08-15 11:22:33,596 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: postfix entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-11211-memcd-11211 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-27017-mongo-27017 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-3306-mysql-3306 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-443-httpd-443 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-5432-pgsql-5432 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-6379-redis-6379 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php_1    | 2022-08-15 11:22:33,596 INFO success: socat-80-httpd-80 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

(Optional) Additional information

No response

gregfr commented 2 years ago

You get the "bad gateway" message when trying to reach the Devilbox GUI or a specific site?

cytopia commented 2 years ago

Are you able to open up the vhosts.php page?

frankroc2022 commented 2 years ago

You get the "bad gateway" message when trying to reach the Devilbox GUI or a specific site?

http://my-node.loc/

frankroc2022 commented 2 years ago

Are you able to open up the vhosts.php page?

Yes

cytopia commented 2 years ago

Are you able to open up the vhosts.php page?

Yes

Can you dump the vhost configuration here. Maybe there is something wrong with the override. You find it on the vhosts.php page

frankroc2022 commented 2 years ago

Nginx Reverse Proxy Template defintion for vhost-gen.py

#

The 'feature' section contains optional features that can be enabled via

conf.yml and will then be replaced into the main vhost ('structure' section)

into their corresponding position:

#

__XDOMAIN_REQ__

ALIASES

DENIES

STATUS

#

The features itself also contain variables to be adjusted in conf.yml

and will then be replaced in their corresponding feature section

before being replaced into the vhost section (if enabled):

#

XDomain:

REGEX

Alias:

REGEX

PATH

Deny:

REGEX

Status:

REGEX

#

Variables to be replaced directly in the vhost configuration can also be set

in conf.yml and include:

__VHOST_NAME__

__DOCUMENT_ROOT__

INDEX

__ACCESS_LOG__

__ERROR_LOG__

#

Basic vHost skeleton

vhost: | server { listen PORT__HTTP_PROTO__DEFAULT_VHOST__; server_name VHOST_NAME__;

  access_log   "__ACCESS_LOG__" combined;
  error_log    "__ERROR_LOG__" warn;

  # Reverse Proxy definition (Ensure to adjust the port, currently '8000')
  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_pass http://php:4000;
  }

REDIRECT SSL ALIASES DENIES __SERVER_STATUS__

Custom directives

CUSTOM }

vHost Type (normal or reverse proxy)

vhost_type: docroot: "" rproxy: ""

Optional features to be enabled in vHost

features:

SSL Configuration

ssl: | ssl_certificate SSL_PATH_CRT; ssl_certificate_key SSL_PATH_KEY; ssl_protocols SSL_PROTOCOLS__; ssl_prefer_server_ciphers SSL_HONOR_CIPHER_ORDER; ssl_ciphers __SSL_CIPHERS;

Redirect to SSL directive

redirect: | return 301 https://__VHOST_NAME__:__SSL_PORT__$request_uri;

PHP-FPM left empty, as we are an reverse proxy configuration

php_fpm: ""

alias: |

Alias Definition

location ~ __ALIAS__ {
    root  __PATH__;
__XDOMAIN_REQ__
}

deny: |

Deny Definition

location ~ __REGEX__ {
    deny all;
}

server_status: |

Status Page

location ~ __REGEX__ {
    stub_status on;
    access_log off;
}

xdomain_request: |

Allow cross domain request from these hosts

if ( $http_origin ~* (__REGEX__) ) {
    add_header "Access-Control-Allow-Origin" "$http_origin";
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
    add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
    add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
    add_header 'Access-Control-Max-Age' 0;
    return 200;
}
frankroc2022 commented 2 years ago

Can you reproduce the bug?

frankroc2022 commented 2 years ago

Any new information?

frankroc2022 commented 2 years ago

Can you reproduce the bug?

Or anyone else? Am I the only one with this problem?

vikas5914 commented 2 years ago

in the Devilbox, can you do the following and provide the output?

curl -I http://php:4000

frankroc2022 commented 2 years ago

Thx for reply/help.

In PHP Container: (right?) curl: (7) Failed to connect to php port 4000: Connection refused

vikas5914 commented 2 years ago

@frankroc2022 Which port is your service running? Maybe run the service and then run the curl command.

frankroc2022 commented 2 years ago

Port 4000 like described in the example: https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-nodejs.html

curl: (7) Failed to connect to php port 4000: Connection refused

@vikas5914 It works for you?

vikas5914 commented 2 years ago

@frankroc2022 The port should be where your Nodejs is running. If it's running on 8080 or 8000, you need to use that.

frankroc2022 commented 2 years ago

Thx, here was my mistake: I changed

NODE_PROJECTS=( "/shared/httpd/my-node/js/index.js" )

to NODE_PROJECTS=( "/shared/httpd/my-node/index.js" <-- it has to be /shared/httpd/my-node/src/index.js )

vikas5914 commented 2 years ago

@frankroc2022 if it's fixed, I suggest you close the issue.

cytopia commented 1 year ago

@frankroc2022

This has now been automated: https://github.com/cytopia/devilbox/pull/942