### Access Bitrix Setup URL Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Navigate to this URL in your browser to initiate the 1C-Bitrix installation process using the bitrixsetup.php script. ```bash http://10.0.1.119:8588/bitrixsetup.php ``` -------------------------------- ### Download Bitrix Setup Scripts Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Download the necessary PHP scripts for installation and restoration into the web server's root directory. Ensure you are in the correct directory before downloading. ```bash cd /opt/www/ wget https://www.1c-bitrix.ru/download/scripts/bitrixsetup.php wget https://www.1c-bitrix.ru/download/scripts/restore.php ``` -------------------------------- ### Access Site Root URL for Installation Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md After downloading the bitrixsetup.php script, access this URL to begin the 1C-Bitrix installation wizard. ```bash http://10.0.1.119:8588/ ``` -------------------------------- ### Enable Nginx Module (Perl Example) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md To enable a module, ensure its load_module line is uncommented and points to the correct .so file. This example shows enabling the 'perl' module. ```bash load_module "/usr/lib/nginx/modules/ngx_http_perl_module.so"; ``` -------------------------------- ### Execute Composer Install Command Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Run this command within the 'php' container's sh-console, after navigating to the Bitrix directory, to install project dependencies using the specified Composer configuration. ```bash cd /opt/www/bitrix/ COMPOSER=composer-bx.json composer install ``` -------------------------------- ### Get Lego Command Help Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Display general help or help for specific Lego commands by appending 'help', '-h', or '--help'. ```bash /lego help /lego -h /lego --help ``` ```bash /lego run --help /lego renew --help /lego revoke --help /lego list --help /lego dnshelp --help ``` -------------------------------- ### Start All Containers in Background Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use this command to launch all defined services in detached mode. Ensure you are in the project directory. ```bash docker compose up -d ``` -------------------------------- ### Entering Specific Service Consoles Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Examples of entering specific service consoles with different user and shell configurations. ```bash docker compose exec mysql bash ``` ```bash docker compose exec --user=bitrix php sh ``` ```bash docker compose exec --user=root php sh ``` -------------------------------- ### Install mc package Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Install the 'mc' package within the Nginx container. ```bash apk add mc exit ``` -------------------------------- ### Configure Nginx SSL Settings Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs 'mc' and edits the Nginx SSL configuration file to specify certificate and key paths. Ensure these paths are correct for your setup. ```bash apk add mc mcedit /etc/nginx/ssl/ssl.conf ``` -------------------------------- ### SSL Connection Check Example Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Illustrates a successful SSL connection to a specific host and port, typically shown in a system check or diagnostic output. ```bash Connection to ssl://dev.bx:8589 Success ``` -------------------------------- ### Execute Commands in Docker Container Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Access the sh-console of the 'php' Docker container as the 'bitrix' user. This is the entry point for running setup and restore scripts. ```bash docker compose exec --user=bitrix php sh ``` -------------------------------- ### Access Site via HTTPS Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example URL to access the site securely using HTTPS, the specified domain, and a custom port. ```bash https://b24.proqacf.fun:8589/ ``` -------------------------------- ### Access Secure Site Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example URL to access a development site using HTTPS after certificates have been successfully imported and trusted. ```bash https://dev.bx:8589/ ``` -------------------------------- ### Pulling Base Docker Images Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use these commands to pre-download the official Docker images for PostgreSQL, Redis, and Memcached. Ensure Docker is installed and running. ```bash docker pull postgres:16.14-trixie docker pull redis:8.2.7-alpine docker pull memcached:1.6.42-alpine ``` -------------------------------- ### Install CA Certificates on Debian/Ubuntu Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs the `ca-certificates` package and updates the system's trusted certificate store. This is for Linux systems like Debian or Ubuntu. ```bash apt install -y ca-certificates update-ca-certificates ``` -------------------------------- ### Run Nginx Module Container (arm64) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Starts a Docker container for the arm64 architecture using the built Nginx modules image. This container is used to access and package the compiled modules. ```bash docker run --platform=linux/arm64 -d --name=nginxmodules1303testingarm64 -it bitrix24/nginx_modules:1.30.3-v1-alpine ``` -------------------------------- ### Access Site via Local IP or Domain Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Examples of how to access the running Bitrix site using localhost, local IP address, or a custom domain. Avoid using 127.0.0.1 or localhost for local development. ```bash http://127.0.0.1:8588/ ``` ```bash https://127.0.0.1:8589/ ``` ```bash http://10.0.1.119:8588/ ``` ```bash https://10.0.1.119:8589/ ``` ```bash http://dev.bx:8588/ ``` ```bash https://dev.bx:8589/ ``` -------------------------------- ### Package Nginx Modules (arm64) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs necessary tools (mc, zip) inside the arm64 container, navigates to the modules directory, and archives the compiled modules into a zip file. ```bash apk add mc zip cd /root/packages/ zip -r nginxmodules_arm64.zip * ``` -------------------------------- ### Configure Nginx Routing Before Site Start Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Before the initial project launch, modify the Nginx configuration file to enable the new routing system. This involves commenting out the old `urlrewrite.php` and uncommenting `routing_index.php`. ```bash #fastcgi_param SCRIPT_FILENAME $document_root/bitrix/urlrewrite.php; fastcgi_param SCRIPT_FILENAME $document_root/bitrix/routing_index.php; ``` -------------------------------- ### Run Nginx Module Container (amd64) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Starts a Docker container for the amd64 architecture using the built Nginx modules image. This container is used to access and package the compiled modules. ```bash docker run --platform=linux/amd64 -d --name=nginxmodules1303testingamd64 -it bitrix24/nginx_modules:1.30.3-v1-alpine ``` -------------------------------- ### Install ca-certificates on RHEL/CentOS Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs the ca-certificates package on RHEL-based systems. This is a prerequisite for managing trusted certificates. ```bash dnf install -y ca-certificates ``` -------------------------------- ### Check Composer Version Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Execute this command in the 'php' container's sh-console to verify that Composer is installed and accessible. ```bash composer --version ``` -------------------------------- ### Default Software Versions Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Lists the default versions of software components used in the project's Docker environment. No setup is required to use these versions. ```bash Memcached 1.6.x Redis 8.2.x PostgreSQL 16.x Percona Server 8.0.x PHP 8.2.x Nginx 1.30.x Sphinx 2.2.11 Lego 4.35.x ``` -------------------------------- ### Package Nginx Modules (amd64) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs necessary tools (mc, zip) inside the amd64 container, navigates to the modules directory, and archives the compiled modules into a zip file. ```bash apk add mc zip cd /root/packages/ zip -r nginxmodules_amd64.zip * ``` -------------------------------- ### Configure Local Domain in PHP Container Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs 'mc' and edits the `/etc/hosts` file within the PHP container to map a local IP address to a development domain. Use this if your local domain is not resolving. ```bash apk add mc mcedit /etc/hosts 10.0.1.119 dev.bx exit ``` -------------------------------- ### Bitrix System Check Output - Email Sending Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example output from the Bitrix 'System Check' tool indicating successful email sending. This confirms that the mail configuration is working correctly. ```text Отправка почты - Отправлено. Время отправки: 1.36 сек. Отправка почтового сообщения больше 64Кб - Отправлено. Время отправки: 1.55 сек. ``` -------------------------------- ### Configure msmtp for Local Mail Server Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example msmtp configuration for a local mail server. Adjust host, port, and TLS settings based on your mail server's specifications. ```bash host mail.server.local port 25 from info@mail.server.local user info@mail.server.local password password_example tls off tls_starttls off tls_certcheck off ``` -------------------------------- ### Lego DNS Challenge - Cloudflare API Token Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example of an API token string for the Cloudflare DNS provider, used for DNS-01 challenges. Replace XXXXXXXXX... with your actual API token. ```bash CLOUDFLARE_DNS_API_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` -------------------------------- ### Configure msmtp for Gmail Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example msmtp configuration for sending emails via Gmail. Replace [LOGIN] with your Gmail username and [APP_PASSWORD] with your Gmail App Password. Ensure TLS settings are correctly configured for Gmail's SMTP server. ```bash # smtp account configuration for default account default logfile /proc/self/fd/2 host smtp.gmail.com port 587 from [LOGIN]@gmail.com user [LOGIN]@gmail.com password [APP_PASSWORD] auth login aliases /etc/aliases keepbcc off tls on tls_starttls on tls_certcheck on tls_trust_file /etc/ssl/certs/ca-certificates.crt protocol smtp ``` -------------------------------- ### Установка Docker и Docker Compose на Альт 10 СП Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Используйте эту команду для установки Docker и Docker Compose из репозиториев ОС Альт 10 СП. Убедитесь, что репозитории настроены правильно. ```bash apt-get install docker-engine containerd docker-buildx docker-cli runc docker-compose-v2 ``` -------------------------------- ### Install ca-certificates and Update Trust on Arch-based Systems Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs the ca-certificates package and updates the system's trusted certificate store on Arch Linux and its derivatives. This command handles both installation and trust update. ```bash pacman -Syu ca-certificates update-ca-trust ``` -------------------------------- ### Run Bitrix CLI Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md After setting up Composer and dependencies, execute this command to interact with the Bitrix Command Line Interface. ```bash php bitrix.php -h ``` -------------------------------- ### Disable Nginx Module (Perl Example) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md To disable a module, comment out its load_module line by adding a '#' at the beginning. This example shows disabling the 'perl' module. ```bash #load_module "/usr/lib/nginx/modules/ngx_http_perl_module.so"; ``` -------------------------------- ### Install mc in Nginx Container Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Install the 'mc' package within the Nginx container's root shell. This utility is often used for file editing. ```bash docker compose exec --user=root nginx sh apk add mc exit ``` -------------------------------- ### Запуск и автозагрузка Docker на Альт 10 СП Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md После установки Docker, запустите сервис и активируйте его автозагрузку при старте ОС. Команда также проверяет статус сервиса. ```bash systemctl restart docker.service && systemctl enable docker.service && systemctl status docker.service --no-pager ``` -------------------------------- ### Install mc editor in cron container Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Installs the 'mc' (Midnight Commander) file editor within the cron container, useful for managing files directly in the container's shell. ```bash apk add mc ``` -------------------------------- ### Configure Push Server Settings in Bitrix Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Update the `/bitrix/.settings.php` file with Push-server configuration. This includes setting listener paths, signature keys, and enabling Nginx and WebSocket support. Ensure `signature_key` is replaced with your generated key and IP/port details are accurate. ```php 'pull' => array( 'value' => array( 'path_to_listener' => 'http://10.0.1.119:8588/bitrix/sub/', 'path_to_listener_secure' => 'https://10.0.1.119:8589/bitrix/sub/', 'path_to_modern_listener' => 'http://10.0.1.119:8588/bitrix/sub/', 'path_to_modern_listener_secure' => 'https://10.0.1.119:8589/bitrix/sub/', 'path_to_mobile_listener' => 'http://10.0.1.119:8893/bitrix/sub/', 'path_to_mobile_listener_secure' => 'https://10.0.1.119:8894/bitrix/sub/', 'path_to_websocket' => 'ws://10.0.1.119:8588/bitrix/subws/', 'path_to_websocket_secure' => 'wss://10.0.1.119:8589/bitrix/subws/', 'path_to_publish' => 'http://10.0.1.119:8588/bitrix/pub/', 'path_to_publish_web' => 'http://10.0.1.119:8588/bitrix/rest/', 'path_to_publish_web_secure' => 'https://10.0.1.119:8589/bitrix/rest/', 'path_to_json_rpc' => 'http://10.0.1.119:8588/bitrix/api/', 'nginx_version' => '4', 'nginx_command_per_hit' => '100', 'nginx' => 'Y', 'nginx_headers' => 'N', 'push' => 'Y', 'websocket' => 'Y', 'signature_key' => 'CHANGE_SECURITY_KEY_HERE', 'signature_algo' => 'sha1', 'guest' => 'N', ), ), ``` -------------------------------- ### Generate Domain Certificate and Key Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Run this command to generate a certificate and private key for a specific domain (e.g., 'dev.bx'). The certificate is signed by the intermediate CA. ```bash docker compose exec --user=bitrix ssl bash -c "~/srv.sh dev.bx" ``` -------------------------------- ### Configure Database Session Storage Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use this configuration for storing sessions in the database. This is a straightforward setup requiring only the 'database' type. ```php // sessions on database 'session' => [ 'value' => [ 'mode' => 'default', 'handlers' => [ 'general' => [ 'type' => 'database', ], ], ], ], ``` -------------------------------- ### Проверка версии Docker Compose на Альт 10 СП Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Используйте эту команду для проверки установленной версии Docker Compose. ```bash docker compose version ``` -------------------------------- ### Update CA Trust on RHEL 9+ Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Updates the system's trusted certificate store on RHEL 9 and newer. Run this after installing certificates. ```bash update-ca-trust ``` -------------------------------- ### Установка Docker и Docker Compose на Astra Linux Special Edition 1.8 Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Установите Docker и Docker Compose из репозиториев ОС Astra Linux Special Edition 1.8. Убедитесь, что активированы главный и расширенный репозитории. ```bash apt install docker.io containerd runc docker-compose-v2 docker-buildx ``` -------------------------------- ### Проверка версии Docker на Альт 10 СП Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Эта команда проверяет работу Docker в режимах сервер и клиент, отображая информацию о версии. ```bash docker version ``` -------------------------------- ### Default Timezone Configuration in .env Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md The default timezone for Docker containers is set in the `.env` file using the `TZ` variable. The example shows `Europe/Moscow` as the default. ```bash TZ=Europe/Moscow ``` -------------------------------- ### Execute Docker Compose Command Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Command to access the 'php' container's shell as the root user. This is often required for installing packages or modifying system configurations. ```bash docker compose exec --user=root php sh ``` -------------------------------- ### Build Bitrix Lego Docker Image Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Builds the custom `bitrix24/lego` Docker image. Change directory to `env-docker/sources/bxlego4352/` before running. Supports building for multiple architectures. ```bash cd env-docker/sources/bxlego4352/ docker buildx build --platform linux/arm64,linux/amd64 --provenance=false -f Dockerfile -t bitrix24/lego:4.35.2-v1-alpine --no-cache . ``` -------------------------------- ### Restart SSL Docker Container Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md If environment variables in .env_ssl are changed, the SSL container must be recreated. Use these commands to stop, remove, and then recreate and start the container. ```bash docker compose stop ssl docker compose rm -f ssl docker compose up -d ``` -------------------------------- ### Execute Backup Task Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This command executes the backup script for the Bitrix site and database. It redirects standard output and error to /dev/null to keep logs clean. ```bash su - bitrix -c 'php -f /opt/www/bitrix/modules/main/tools/backup.php; > /dev/null 2>&1' ``` -------------------------------- ### Copy CA Certificates to Web Root and Set Permissions Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Copies the root and intermediate CA certificate files to the web root directory and sets the correct ownership for the 'bitrix' user. This makes them accessible via HTTP. ```bash cp /ssl/rootCA.cert.pem /opt/www/ cp /ssl/intermediateCA.cert.pem /opt/www/ chown bitrix:bitrix /opt/www/rootCA.cert.pem chown bitrix:bitrix /opt/www/intermediateCA.cert.pem exit ``` -------------------------------- ### Update Timezone Configuration for PHP 8.2 in .env Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md To change the timezone for PHP containers, update the `TZ` variable in the `.env` file. This example sets it to `Europe/Kaliningrad` for PHP 8.2. ```bash TZ=Europe/Kaliningrad ``` -------------------------------- ### Execute Default Bitrix Cron Events Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This command executes the default cron events for the main Bitrix module. It is intended to be run by the cron container and requires the Bitrix distribution to be installed. ```bash php -f /opt/www/bitrix/modules/main/tools/cron_events.php ``` -------------------------------- ### Build Bitrix SSL Docker Image Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Builds the custom `bitrix24/ssl` Docker image. Execute from the `env-docker/sources/bxssl12/` directory. This command supports building for both `arm64` and `amd64` architectures. ```bash cd env-docker/sources/bxssl12/ docker buildx build --platform linux/arm64,linux/amd64 --provenance=false -f Dockerfile -t bitrix24/ssl:1.2-v1-alpine --no-cache . ``` -------------------------------- ### Изменение портов Nginx в docker-compose.yml Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Обновите сопоставление портов для сервиса nginx в файле docker-compose.yml, чтобы соответствовать новым настройкам портов. ```yaml - "8588:8080" - "8589:8443" ``` -------------------------------- ### Изменение портов Nginx в confs/nginx/conf.d/default.conf Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Перед запуском проекта необходимо изменить порты для nginx в файле конфигурации. Замените стандартные порты 80 и 443 на 8080 и 8443 соответственно. ```bash - "80:80" - "443:443" ``` -------------------------------- ### Test Nginx Configuration and Restart Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md After modifying the Nginx configuration, test its syntax and then restart the Nginx container to apply the changes. ```bash docker compose exec --user=bitrix nginx sh -c "nginx -t" docker compose restart nginx ``` -------------------------------- ### msmtp Email Sending Log Entry Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Example log entry from the 'php' container showing details of an email being sent via msmtp. This log is useful for debugging email sending issues. ```text Apr 12 22:52:14 host=smtp.gmail.com tls=on auth=on user=***@gmail.com from=***@gmail.com recipients=hosting_test@bitrixsoft.com mailsize=211 smtpstatus=250 smtpmsg='250 2.0.0 OK 1744498333 2adb3069b0e04-54d3d502717sm712937e87.144 - gsmtp' exitcode=EX_OK Apr 12 22:52:15 host=smtp.gmail.com tls=on auth=on user=***@gmail.com from=***@gmail.com recipients=hosting_test@bitrixsoft.com,noreply@bitrixsoft.com mailsize=200205 smtpstatus=250 smtpmsg='250 2.0.0 OK 1744498335 2adb3069b0e04-54d3d502618sm743850e87.107 - gsmtp' exitcode=EX_OK ``` -------------------------------- ### Build Bitrix Push Docker Image Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Builds the custom `bitrix24/push` Docker image. Navigate to the `env-docker/sources/bxpush33/` directory before execution. This command is designed for multi-platform builds. ```bash cd env-docker/sources/bxpush33/ docker buildx build --platform linux/arm64,linux/amd64 --provenance=false -f Dockerfile -t bitrix24/push:3.3-v1-alpine --no-cache . ``` -------------------------------- ### Lego HTTP Challenge - Multi-Domain Issuance (Staging) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Issue an SSL certificate for multiple domains using the HTTP-01 challenge on the Let's Encrypt staging environment. This is useful for testing. ```bash /lego \ --server="https://acme-staging-v02.api.letsencrypt.org/directory" \ --accept-tos \ --email "info@site.dev" \ --path="/ssl/site.dev/" \ --domains "shop.site.dev" \ --domains "wiki.site.dev" \ --domains "forum.site.dev" \ --http \ --http.port ":80" \ run ``` -------------------------------- ### Execute Bitrix Server Test Script Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Commands to execute the bitrix_server_test.php script for basic web server configuration checks. This involves entering the PHP container, navigating to the site root, downloading the script, and accessing it via a browser. ```bash docker compose exec --user=bitrix php sh ``` ```bash cd /opt/www/ ``` ```bash wget https://dev.1c-bitrix.ru/download/scripts/bitrix_server_test.php ``` ```bash http://10.0.1.119:8588/bitrix_server_test.php ``` -------------------------------- ### HTTP Challenge (http-01) for Single Domain - Response Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This is a sample response from the Lego tool after successfully obtaining an SSL certificate using the HTTP-01 challenge. It indicates successful validation and certificate issuance. ```text 2025/04/30 23:17:03 No key found for account info@proqacf.fun. Generating a P256 key. 2025/04/30 23:17:03 Saved key to /ssl/singledomain.http.b24.proqacf.fun/accounts/acme-v02.api.letsencrypt.org/info@proqacf.fun/keys/info@proqacf.fun.key 2025/04/30 23:17:04 [INFO] acme: Registering account for info@proqacf.fun !!!! HEADS UP !!!! Your account credentials have been saved in your configuration directory at "/ssl/singledomain.http.b24.proqacf.fun/accounts". You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained from the ACME server so making regular backups of this folder is ideal. 2025/04/30 23:17:04 [INFO] [b24.proqacf.fun] acme: Obtaining bundled SAN certificate 2025/04/30 23:17:05 [INFO] [b24.proqacf.fun] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/197567964/1710482XXXX 2025/04/30 23:17:05 [INFO] [b24.proqacf.fun] acme: Could not find solver for: tls-alpn-01 2025/04/30 23:17:05 [INFO] [b24.proqacf.fun] acme: use http-01 solver 2025/04/30 23:17:05 [INFO] [b24.proqacf.fun] acme: Trying to solve HTTP-01 2025/04/30 23:17:06 [INFO] [b24.proqacf.fun] Served key authentication 2025/04/30 23:17:06 [INFO] [b24.proqacf.fun] Served key authentication 2025/04/30 23:17:06 [INFO] [b24.proqacf.fun] Served key authentication 2025/04/30 23:17:06 [INFO] [b24.proqacf.fun] Served key authentication 2025/04/30 23:17:06 [INFO] [b24.proqacf.fun] Served key authentication 2025/04/30 23:17:13 [INFO] [b24.proqacf.fun] The server validated our request 2025/04/30 23:17:13 [INFO] [b24.proqacf.fun] acme: Validations succeeded; requesting certificates 2025/04/30 23:17:13 [INFO] Wait for certificate [timeout: 30s, interval: 500ms] 2025/04/30 23:17:15 [INFO] [b24.proqacf.fun] Server responded with a certificate. ``` -------------------------------- ### Specify Email for Registration and Contact Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Provide your email address for registration and recovery contact purposes. ```bash --email "info@site.dev" ``` -------------------------------- ### Configure Cache on Redis (No Password) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This snippet configures the Bitrix system to use Redis for caching without requiring a password. Ensure the redis extension is available. ```php // cache on redis 'cache' => [ 'value' => [ 'type' => [ 'class_name' => '\Bitrix\Main\Data\CacheEngineRedis', 'extension' => 'redis' ], 'redis' => [ 'host' => 'redis', 'port' => '6379', ] ], 'sid' => $_SERVER["DOCUMENT_ROOT"]."#01234" ], ``` -------------------------------- ### Configure Cache on Redis (With Password) Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use this snippet to configure the Bitrix system to use Redis for caching with password authentication. Replace 'CHANGE_REDIS_PASSWORD_HERE' with your actual Redis password. ```php // cache on redis with password 'cache' => [ 'value' => [ 'type' => [ 'class_name' => '\Bitrix\Main\Data\CacheEngineRedis', 'extension' => 'redis' ], 'redis' => [ 'host' => 'redis', 'port' => '6379', 'password' => 'CHANGE_REDIS_PASSWORD_HERE', ] ], 'sid' => $_SERVER["DOCUMENT_ROOT"]."#01234" ], ``` -------------------------------- ### Enable Routing for Running Site Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md To enable the new routing system for a running site, access the Nginx container's shell, edit the default configuration file, and modify the `SCRIPT_FILENAME` parameters. ```bash docker compose exec --user=bitrix nginx sh mcedit /etc/nginx/conf.d/default.conf #fastcgi_param SCRIPT_FILENAME $document_root/bitrix/urlrewrite.php; fastcgi_param SCRIPT_FILENAME $document_root/bitrix/routing_index.php; ``` -------------------------------- ### Create Custom Daily Backup Cron Job Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This script creates a daily backup of the Bitrix site and MySQL database. It is placed in the cron container's daily execution directory and run as the 'bitrix' user. ```bash #!/bin/sh # su - bitrix -c 'php -f /opt/www/bitrix/modules/main/tools/backup.php; > /dev/null 2>&1' # ``` -------------------------------- ### Environment Variables for Database Passwords Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Define MySQL root and PostgreSQL passwords in the .env_sql file using these placeholders. Replace the placeholder values with your generated passwords. ```bash MYSQL_ROOT_PASSWORD="CHANGE_MYSQL_ROOT_PASSWORD_HERE" POSTGRES_PASSWORD="CHANGE_POSTGRESQL_POSTGRES_PASSWORD_HERE" ``` -------------------------------- ### List of Available PHP Extensions Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md The `bitrix24/php` Docker image includes a comprehensive set of PHP extensions. Most are active by default. ```bash amqp apcu bz2 calendar exif gd gettext igbinary imagick intl ldap mcrypt memcache memcached msgpack mysqli opcache pdo_mysql pdo_pgsql pgsql pspell redis shmop sockets sodium ssh2 sysvmsg sysvsem sysvshm xdebug xhprof xml xmlwriter xsl zip ``` -------------------------------- ### Configure Cache on Memcache Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use this snippet to configure the Bitrix system to use Memcache for caching. Ensure the memcache extension is available. ```php // cache on memcache 'cache' => [ 'value' => [ 'type' => [ 'class_name' => '\Bitrix\Main\Data\CacheEngineMemcache', 'extension' => 'memcache' ], 'memcache' => [ 'host' => 'memcached', 'port' => '11211', ] ], 'sid' => $_SERVER["DOCUMENT_ROOT"]."#01234" ], ``` -------------------------------- ### Specify Wildcard and Main Domain for Certificate Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md For wildcard certificates, specify both the main domain and the wildcard domain (e.g., '*.domain.com'). ```bash --domains "site.dev" ``` ```bash --domains "*.site.dev" ``` -------------------------------- ### Build Bitrix Percona Server 8.0 Docker Image Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Builds the custom `bitrix24/percona-server` Docker image for version 8.0.x. Navigate to `env-docker/sources/bxpercona8046/` before execution. Supports building for `arm64` and `amd64`. ```bash cd env-docker/sources/bxpercona8046/ docker buildx build --platform linux/arm64,linux/amd64 --provenance=false -f Dockerfile -t bitrix24/percona-server:8.0.46-v1-rhel --no-cache . ``` -------------------------------- ### Accessing Valkey CLI Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Execute this command to open a shell within the Valkey container and access the Valkey CLI. Specify the host and port if not default. ```bash docker compose exec --user=root valkey sh -c "valkey-cli -h 127.0.0.1 -p 6379" ``` -------------------------------- ### LetsEncrypt Staging Server URL Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use this server URL for testing the entire certificate generation chain in the LetsEncrypt staging environment. ```bash --server="https://acme-staging-v02.api.letsencrypt.org/directory" ``` -------------------------------- ### Implement Custom Mail Logging Function Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Create or modify `/bitrix/php_interface/init.php` to include this function. It logs mail sending details using `AddMessage2Log` before attempting to send the email. ```php function custom_mail($to, $subject, $message, $additional_headers='', $additional_parameters='') { AddMessage2Log( 'To: '.$to.PHP_EOL. 'Subject: '.$subject.PHP_EOL. 'Message: '.$message.PHP_EOL. 'Headers: '.$additional_headers.PHP_EOL. 'Params: '.$additional_parameters.PHP_EOL ); if ($additional_parameters!='') { return @mail($to, $subject, $message, $additional_headers, $additional_parameters); } else { return @mail($to, $subject, $message, $additional_headers); } } ``` -------------------------------- ### Allow Ports with Firewall-cmd Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md Use these commands on RHEL/CentOS/AlmaLinux/RockyLinux/OracleLinux/ArchLinux systems to permanently open ports 8588 and 8589 for TCP traffic and reload the firewall. ```bash firewall-cmd --add-port=8588/tcp --permanent && firewall-cmd --add-port=8589/tcp --permanent && firewall-cmd --reload ``` -------------------------------- ### Configure Alternative MySQL (Percona Server) Version Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md To use an alternative MySQL (Percona Server) version, edit `docker-compose.yml` before the first launch. Uncomment the desired version and comment out the current one in the `mysql` service. ```yaml #image: quay.io/bitrix24/percona-server:8.0.46-v1-rhel image: quay.io/bitrix24/percona-server:8.4.8-v1-rhel ``` -------------------------------- ### DNS-01 Challenge Output for Multidomain SSL Source: https://github.com/bitrix-tools/env-docker/blob/main/README.md This output shows the logs from a successful DNS-01 challenge for obtaining a multidomain SSL certificate. It details account registration, certificate acquisition for multiple subdomains, DNS record creation and propagation, and final certificate issuance. The certificate files will be located in the specified directory upon success. ```log 2025/04/30 23:21:20 No key found for account info@proqacf.fun. Generating a P256 key. 2025/04/30 23:21:20 Saved key to /ssl/multidomain.dns.all.proqacf.fun/accounts/acme-v02.api.letsencrypt.org/info@proqacf.fun/keys/info@proqacf.fun.key 2025/04/30 23:21:21 [INFO] acme: Registering account for info@proqacf.fun !!!! HEADS UP !!!! Your account credentials have been saved in your configuration directory at "/ssl/multidomain.dns.all.proqacf.fun/accounts". You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained from the ACME server so making regular backups of this folder is ideal. 2025/04/30 23:21:21 [INFO] [b25.proqacf.fun, wiki.proqacf.fun, shop.proqacf.fun] acme: Obtaining bundled SAN certificate 2025/04/30 23:21:22 [INFO] [b25.proqacf.fun] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/197568584/1710486XXXX 2025/04/30 23:21:22 [INFO] [shop.proqacf.fun] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/197568584/1710486XXXX 2025/04/30 23:21:22 [INFO] [wiki.proqacf.fun] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/197568584/1710486XXXX 2025/04/30 23:21:22 [INFO] [b25.proqacf.fun] acme: Could not find solver for: tls-alpn-01 2025/04/30 23:21:22 [INFO] [b25.proqacf.fun] acme: Could not find solver for: http-01 2025/04/30 23:21:22 [INFO] [b25.proqacf.fun] acme: use dns-01 solver 2025/04/30 23:21:22 [INFO] [shop.proqacf.fun] acme: Could not find solver for: tls-alpn-01 2025/04/30 23:21:22 [INFO] [shop.proqacf.fun] acme: Could not find solver for: http-01 2025/04/30 23:21:22 [INFO] [shop.proqacf.fun] acme: use dns-01 solver 2025/04/30 23:21:22 [INFO] [wiki.proqacf.fun] acme: Could not find solver for: tls-alpn-01 2025/04/30 23:21:22 [INFO] [wiki.proqacf.fun] acme: Could not find solver for: http-01 2025/04/30 23:21:22 [INFO] [wiki.proqacf.fun] acme: use dns-01 solver 2025/04/30 23:21:22 [INFO] [b25.proqacf.fun] acme: Preparing to solve DNS-01 2025/04/30 23:21:25 [INFO] cloudflare: new record for b25.proqacf.fun, ID d7988d0a8952175b7480b2636065XXXX 2025/04/30 23:21:25 [INFO] [shop.proqacf.fun] acme: Preparing to solve DNS-01 2025/04/30 23:21:26 [INFO] cloudflare: new record for shop.proqacf.fun, ID e202bae64f3cb22c8ae543fb6563XXXX 2025/04/30 23:21:26 [INFO] [wiki.proqacf.fun] acme: Preparing to solve DNS-01 2025/04/30 23:21:27 [INFO] cloudflare: new record for wiki.proqacf.fun, ID e7c3e21d948f97315cb4cb6c4f1dXXXX 2025/04/30 23:21:27 [INFO] [b25.proqacf.fun] acme: Trying to solve DNS-01 2025/04/30 23:21:27 [INFO] [b25.proqacf.fun] acme: Checking DNS record propagation. [nameservers=1.1.1.1:53,8.8.8.8:53,9.9.9.9:53,1.0.0.1:53,8.8.4.4:53] 2025/04/30 23:21:29 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s] 2025/04/30 23:21:29 [INFO] [b25.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:38 [INFO] [b25.proqacf.fun] The server validated our request 2025/04/30 23:21:38 [INFO] [shop.proqacf.fun] acme: Trying to solve DNS-01 2025/04/30 23:21:38 [INFO] [shop.proqacf.fun] acme: Checking DNS record propagation. [nameservers=1.1.1.1:53,8.8.8.8:53,9.9.9.9:53,1.0.0.1:53,8.8.4.4:53] 2025/04/30 23:21:40 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s] 2025/04/30 23:21:40 [INFO] [shop.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:42 [INFO] [shop.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:45 [INFO] [shop.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:47 [INFO] [shop.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:49 [INFO] [shop.proqacf.fun] acme: Waiting for DNS record propagation. 2025/04/30 23:21:55 [INFO] [shop.proqacf.fun] The server validated our request 2025/04/30 23:21:55 [INFO] [wiki.proqacf.fun] acme: Trying to solve DNS-01 2025/04/30 23:21:55 [INFO] [wiki.proqacf.fun] acme: Checking DNS record propagation. [nameservers=1.1.1.1:53,8.8.8.8:53,9.9.9.9:53,1.0.0.1:53,8.8.4.4:53] 2025/04/30 23:21:57 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s] 2025/04/30 23:22:03 [INFO] [wiki.proqacf.fun] The server validated our request 2025/04/30 23:22:03 [INFO] [b25.proqacf.fun] acme: Cleaning DNS-01 challenge 2025/04/30 23:22:04 [INFO] [shop.proqacf.fun] acme: Cleaning DNS-01 challenge 2025/04/30 23:22:05 [INFO] [wiki.proqacf.fun] acme: Cleaning DNS-01 challenge 2025/04/30 23:22:06 [INFO] [b25.proqacf.fun, wiki.proqacf.fun, shop.proqacf.fun] acme: Validations succeeded; requesting certificates 2025/04/30 23:22:06 [INFO] Wait for certificate [timeout: 30s, interval: 500ms] 2025/04/30 23:22:09 [INFO] [b25.proqacf.fun] Server responded with a certificate. ```