Posts

How to Update the SSL Domain Certificate After Self-Hosting a JihuLab Code Platform

  Background After deploying a self-hosted JihuLab code platform, the domain's SSL certificate expired, making the management interface inaccessible. Local code could no longer be synchronized with the remote repository. Objective: Update the domain's SSL certificate to restore access to the platform and enable code synchronization. Implementation Steps 1. Locate the Certificate Configuration in JihuLab Run the following command to check the actual certificate paths configured in JihuLab: grep -nEi "external_url|ssl_certificate|ssl_certificate_key|letsencrypt" /etc/gitlab/gitlab.rb The output will look similar to the following: external_url 'https://explore.com' nginx['ssl_certificate'] = "/etc/gitlab/ssl/explore.com.pem" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/explore.com.key" Based on the configuration above, the certificate files are located in the following directory: /etc/gitlab/ssl/ 2. Download the New Certifi...

How to Add Code Highlighting to Blogger Without Plugins

Most rich-text editors offer a feature that allows you to select specific content and format it as a code block, often with syntax highlighting. However, Blogger's built-in post editor does not provide this functionality, and I really needed it for my technical blog. So, how could I implement code highlighting in Blogger without replacing the existing editor? I initially came up with two ideas: Switch to a different rich-text editor. Add a code block feature to the existing editor. The best solution would have been to replace the editor with another rich-text editor. Unfortunately, Blogger does not provide an option to switch between different editors. The second option was slightly less ideal: modify the existing editor's source code to add a code block button and the logic required to display syntax highlighting. Unfortunately, Blogger does not provide a way to directly modify the editor's source code either. Both approaches had reached a dead end. I asked AI for alternat...

How to Fix PHP 8.2 Fileinfo Installation Failure on Baota (BT) Panel

1. Problem Background Server Environment Item Configuration Operating System Ubuntu 22.04 CPU 2 cores Memory Approximately 2 GiB PHP PHP 8.2.x PHP Build Type NTS Management Panel Baota (BT) Panel PHP Installation Directory /www/server/php/82 Fileinfo Source Directory /www/server/php/82/src/ext/fileinfo The server has limited memory. When installing the PHP Fileinfo extension directly through the Baota panel, the compilation process fails. 2. Error Messages During the Fileinfo installation process in Baota, compilation gets stuck at: libmagic/apprentice.c The following error may then appear: cc: fatal error: Killed signal terminated program cc1 compilation terminated. Eventually, the following error occurs: make: *** [Makefile:xxx: libmagic/apprentice.lo] Error 1 Alternatively, Baota may simply report that the Fileinfo installation failed. 3. Root Cause Although this error appears to be a C compilation error, the actual problem is not necessarily an issue with the Fileinfo source code i...