Andy Wits Blog

All blog posts

How to get views field raw value and entity Translation's title in Twig (Drupal) 2 minute read

In this blog post, I discuss a task where I needed to display multiple fields from a specific content type in a single Drupal View. To achieve the required design, I created a custom Twig template and used Tailwind CSS for styling. However, I faced an issue where field values were being repeated incorrectly. After some debugging and research, I found a workaround.

Launching a Python Script via Gunicorn + Nginx on a Server Managed by Hestia CP 5 minute read

This post shows how to run a Python app with Gunicorn and Nginx on a server managed by Hestia CP. Since there’s no official support, I created custom templates and used Supervisor for process management. It’s a two-stage setup: configuring Nginx templates and setting up Gunicorn via virtualenv and Supervisor.

Drupal 7 + Nginx + "upstream sent invalid Content-Length header" error 2 minute read

This post shares how to troubleshoot Nginx issues with a Drupal 7 site, including errors related to invalid Content-Length headers and PHP-FPM socket failures. Switching from Unix sockets to TCP and adjusting worker_connections resolved the problems. It also notes how Hestia CP can overwrite custom settings.

Installing Bitrix24 on Proxmox VE on Hetzner Server from Scratch 3 minute read

This guide walks through the complete installation and setup of Proxmox VE on Debian 12, followed by deploying Bitrix24 in both a KVM-based VM and an LXC container. Key points include network bridging, VM disk resizing, GRUB issues, and Bitrix environment installation quirks. It also covers SSH hardening, SSL setup, 2FA, backup restoration, timezone correction, and email configuration.

Bitrix24. Changing the encoding of the Bitrix24 website from CP-1251 to UTF-8, notes 5 minute read

This post describes converting a Bitrix24 project to UTF-8 encoding using the official manual with added tips. It includes backing up, adjusting Apache and PHP configs, database conversion, recoding scripts, and fixing charset conflicts in MySQL tables by recreating them.

How to install Ghost CMS via Docker on server with plesk control panel 5 minute read

This post explains how to install Ghost CMS on a Plesk server using Docker, since Ghost requires MySQL and not MariaDB. It covers setting up Plesk extensions, configuring Docker containers for MySQL and Ghost, linking them, setting proxy rules, and handling multiple blogs or subdomain setups.

Setting up GeoIP on Drupal 7 and Drupal 10, 11 4 minute read

This post explains how to integrate MaxMind GeoIP in Drupal 7 and 10/11 using the GeoIP module. It includes API differences, cache configuration for dynamic blocks, and how to update GeoIP databases using a bash script and geoipupdate, ensuring the latest IP data is synced with your Drupal site.

"Field entity definition" error when upgrading Drupal 9 3 minute read

This post shows how to fix entity and field definition mismatch errors in Drupal using the Entity Update module. After installing it, some database errors appeared due to missing columns. The solution was to manually add the missing fields via SQL, rerun the update, and confirm the error was resolved.

Drupal 9 - composer update causes drush php Cannot redeclare error 1 minute read

After updating Drupal 9 from version 9.3 to 9.5, a bug caused Composer to install files in the wrong directory, breaking the site with a redirect to the install page. The issue was fixed by deleting vendor and composer.lock, adjusting the composer.json config, and running composer install.

Hestia CP + Nginx + Php-fpm - php code execution in html 1 minute read

This post explains how to enable PHP code execution in static HTML files on a server running Hestia CP with Nginx and PHP-FPM. It involves editing nginx templates to handle .html files as PHP, updating domain-specific PHP-FPM configs, and adjusting security.limit_extensions to allow .html files.

Translation of a text fragment in October CMS is not created, rainlab translate plugin 1 minute read

In October CMS with the RainLab Translate module, translations stop working for messages around 200 characters. Each page refresh creates duplicate entries. The issue is caused by a database column limit. Manually increasing the "code" column size in the database resolves it.

Building PHP 7.4 with phpbrew on Ubuntu/Debian Server (Vesta CP) 2 minute read

The task was to install PHP 7.4 on an Ubuntu server (it is also possible on Debian). Vesta CP is used to manage my server and I'll install PHP 7.4.8 via phpbrew. Phpbrew pre-setup on Ubuntu/Debian server running Vesta CP Go to /root directory cd /root Let's prepare phpbrew for compilation. We will put in an alternative...

Contact me on