Easy-To-Manage Bludit CMS for CentOS 8

Easy-To-Manage Bludit CMS for CentOS 8 1

Bludit CMS is a very fast, simple, popular and flexible content management system. Bludit CMS uses JSON files to store content. With this use, you no longer need to install or configure a database. This CMS includes a huge number of SEO tools for your comfortable work. It also boosts your site’s ranking in all search engines as well as social media. When it comes to security, this CMS has done well in that regard! She is concerned about user safety and does not track frameworks or other resources on your site. In order to correctly and successfully install this CMS, you need the following:

  • Server that supports CentOS
  • Server administrator rights
  • Latest CentOS Updates for Your VPS

PHP Install required for Bludit CMS

Linux CentOS 7 distribution runs PHP with version 5. However, the minimum version for Bludit CMS PHP requirement is version 5.6. You can install PHP version 7.4 from the Remi repository, a long-standing and trusted community repository for CentOS.

First you need to be logged in as root user. Some packages in the dedicated Remi repository are dependent on packages in the EPEL repository. This means that you need to enable the EPEL repository first:

yum -y install epel-release

Next, you need to enable the Remi repository. This is available using a special program:

yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

For comfortable work with Bludit CMS, it is recommended to install the yum-utils package for configuring repositories

yum -y install yum-utils

Enable Your PHP for Bludit CMS

After successful installation, you need to enable your PHP

yum-config-manager --disable 'remi-php*'
yum-config-manager --enable   remi-php74

Your PHP needs PHP-FPM to be installed as well. You must then enable it:

yum -y install php-cli php-fpm php-gd php-json php-mbstring php-xml
systemctl enable php-fpm.service

Then it should list all the time zones that are used for your CentOS system. Use the UP & DOWN keys to move through the list and press Q to exit

timedatectl list-timezones

After successfully selecting the time zone, you need to edit the main PHP configuration file. This manual is used by nano as its editor, but you can use another editor like vim

nano /etc/php.ini

It is important to increase the security of your server, create a special user named bludit user or PHP-FPM process group for Bludit. This user also owns the Bludit source files.

adduser bludit

Then you need to create a PHP-FPM configuration file from the default file. Please follow this command

cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/bludit.conf

Rename the default file to disable it and save it as a backup

mv /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.conf.default

You can edit the PHP-FPM configuration file like this

nano /etc/php-fpm.d/bludit.conf

In the configuration file, any line starting with ; symbol is a comment.

Make sure listen = 127.1.2.3:9000 setting doesn’t start with;. This parameter forces PHP to listen on 127.1.2.3 and port 9000.

Then find the following settings:

  • Change [www] to [bludit]
  • Change user = apache to user = bludit
  • Change group = apache to group = bludit
  • Change /var/log/php-fpm/www-error.log to /var/log/fpm-php/bludit/error.log
  • Change / var / lib / php / session to /var/lib/php/session.bludit

Then please save this file and after that you can exit. Now you have similar folders, you need to fix that. For Bludit CMS This can be done as follows: create a separate folder named /var/log/fpm-php/bludit. It will store all log messages and a folder named /var/lib/php/session.bludit. In order to store all sessions and their PHP data. Please follow this special command:

mkdir -p /var/log/fpm-php/bludit
mkdir -p /var/lib/php/session.bludit

To work comfortably with Bludit CMS, you need to update the ownership and permissions for two folders. This is so that only PHP-FPM Bludit processes can write to them

chown bludit:bludit /var/log/fpm-php/bludit
chmod 700 /var/log/fpm-php/bludit
chown bludit:bludit /var/lib/php/session.bludit
chmod 700 /var/lib/php/session.bludit

Please check your configuration now. It is the new one:

php-fpm -t

Then, finally, you can run PHP-FPM

systemctl start php-fpm.service

Bludit CMS Installation

First, you need to download the Bludit source archive. This can be done both on the main site and via the link:

https://www.bludit.com/releases/bludit-3-13-1.zip

https://github.com/bludit/bludit/archive/refs/tags/3.13.1.tar.gz

Unpack the archive file

tar xzf 3.13.1.tar.gz

After successfully unpacking the archive, make bludit as the owner of the source folder

chown -R bludit:bludit bludit*

Next, you will need to move the source code folder to the folder that is specified as /var/www/bludit. This is required insofar as usually the website source folders are located in this /var/www folder

mkdir -p /var/www
mv bludit* /var/www/bludit

Nginx Installation

For your Bludit CMS to work properly and comfortably, you need to install an Nginx web server. This will help make your work worthy and enjoyable! In order to install Nginx on your CentOS virtual server, enter the following command:

yum -y install nginx

It will be great if your web server is always up and running. This can be done using the following command:

systemctl enable nginx.service

This CMS will request a new configuration file and of course you will need to create it. This can be followed as follows:

nano /etc/nginx/conf.d/bludit-http.conf

Next, after successfully creating a configuration file for your Bludit, you need to edit it. To do this, you need to supplement it and replace domainexample.com with the domain name or IP address of your server:

server {
  listen 80;
  listen [::]:80;

  server_name domainexample.com;

  root  /var/www/bludit;
  index index.html index.php;

  # All URLs are processed by index.php
  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  # For security, deny direct access to the following folders
  location ^~ /bl-content/databases/ { deny all; }
  location ^~ /bl-content/workspaces/ { deny all; }
  location ^~ /bl-content/pages/ { deny all; }
  location ^~ /bl-content/tmp/ { deny all; }

  # For security, deny direct access to PHP files inside the "bl-kernel" folder
  location ~ ^/bl-kernel/.+\.php$ { deny all; }

  # Pass PHP files to the FastCGI server listening on 127.1.2.3:9000
  location ~ \.php$ {
    # Mitigate https://httpoxy.org/ vulnerabilities
    fastcgi_param HTTP_PROXY "";

    fastcgi_pass 127.1.2.3:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
  }

  # Set expiration of assets to MAX for caching
  location ~* \.(jpg|jpeg|gif|png|css|js|ico|svg|eot|ttf|woff|woff2|otf)$ {
    expires max;
    log_not_found off;
  }
}

After that, it is very important to save the changes in order for them to take effect. Then you can check your new configuration. There is a very simple command for this:

nginx -t

Since you made the changes, now you will need to start your web server service with the start command:

systemctl start nginx.service

You need to update your firewall in order for incoming HTTP and HTTPS requests. It needs to take over and succeed on your web server

firewall-cmd --permanent --zone=public --add-service=http

The last step is to reboot. This is required for your current firewall session.

firewall-cmd --reload