Categories
Tutorial

How to configure YunoHost apps

Some apps require editing the config or .env file to configure app options.

Over YunoHost the app configutation files are usually located at:
/var/www/app_name/
or
/home/yunohost.app/app_name/

You can SFTP to that directory and edit the configuration file. Check out the app documention for the config file name and parameters.

After editing the config file, you may need to restart the app. For that, go to Tools > Services > App Name and then click on “Restart“.

Categories
Solution

FileRun: This software application is registered to a different server hostname

If you have registered your FileRun while running from one domain and then they to use it over another domain, you will get the error: This software application is registered to a different server hostname

To solve it, log into FileRun over the old domain, go to FileRun > License.
Then on top right, click on the “Unregister” link.

You can also remove the file system/data/.filerun.bin

Once unregistered, access FileRun from your new domain and register it again.

Categories
Tutorial

How to enable OpenLiteSpeed WebAdmin on CyberPanel

How to enable OpenLiteSpeed WebAdmin on CyberPanel: https://community.cyberpanel.net/t/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console/14052

In short, run this command in ssh:
/usr/local/lsws/admin/misc/admpass.sh

If you are using any firewall, allow TCP 7080

Then access the OpenLiteSpeed WebAdmin by https://server.host.name:7080

Categories
Tutorial

How to install FFmpeg on CentOS cPanel server

How to install FFmpeg on CentOS cPanel server:

Step 1: Update the system
sudo yum install epel-release -y
sudo yum update -y

Step 2: Install the Nux Dextop YUM repo
There are no official FFmpeg rpm packages for CentOS for now. Instead, you can use a 3rd-party YUM repo, Nux Dextop, to finish the job.

On CentOS 7, you can install the Nux Dextop YUM repo with the following commands:

sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

For CentOS 6, you need to install another release:

sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Step 3: Install FFmpeg and FFmpeg development packages
sudo yum install ffmpeg ffmpeg-devel -y

Step 4: Test drive
Confirm the installation of FFmpeg:

ffmpeg

source: https://forums.cpanel.net/threads/ffmpeg-on-cpanel-server.478751/post-2519691

Categories
Tutorial

CyberPanel: Reverse Proxy to Docker Container

How to Reverse Proxy Traffic to Docker Container on CyberPanel:
https://community.cyberpanel.net/t/reverse-proxy-traffic-to-docker-container-on-cyberpanel/30644

Setup Reverse Proxy:
Open and edit: /usr/local/lsws/conf/httpd_config.conf

extprocessor dockerbackend {
  type                    proxy
  address                 127.0.0.1:8080
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

Here “dockerbackend” is a referance name to use later and “8080” is the docker container port.

Use Rewrite Rules to Proxy traffic to your Container:
Now create a website and create the following a .htaccess rewrite rule there.
REWRITERULE ^(.*)$ HTTP://dockerbackend/$1 [P]

If you want to force redirect SSL then use the following:

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
REWRITERULE ^(.*)$ http://dockerbackend/$1 [P]
Categories
Tutorial

Change DirectAdmin user /home location

Say, you have added another drive (or slab) to your server (or vps) and want to create your user home directories to that location instead of /home

To achieve that, first mount your new drive (or slab) as /home2

Then go to /etc/defaut/useradd and set HOME=/home to HOME=/home2.

Categories
Tutorial

How to add swap on CentOS 7

If your vps does not come with swap, you can easily add swap to centos 7 following this guide: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7

Categories
Solution

Disable mod_pagespeed for a single user

If you need to disable mod_pagespeed for a single user or domain, you can do so simply by adding the following to .htaccess

<IfModule pagespeed_module>
    ModPagespeed off
</IfModule>

Works with cpanel, directadmin, centos, ubuntu, apache… anything!

Categories
Solution

Invalid configuration value: failovermethod=priority – Oracle Cloud

On a CentOS installation over Oracle Cloud, when running dnf or yum, you may get the error:

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist

To solve the issue, using the command line tool sed, we first start off by making a backup of the repository files:

sudo sed -iBAK '/^failovermethod=/d' /etc/yum.repos.d/*.repo

Then we use the sed command again to remove the problematic parameter in the repository files:

sudo sed '/^failovermethod=/d' /etc/yum.repos.d/*.repo

Once you have done it, you can run dnf to check whether the error appears again:

dnf upgrade

Source: https://communicode.io/how-to-fix-failovermethod-error-fedora/

Categories
Solution

Failed loading plugin “osmsplugin”: No module named ‘librepo’ – Oracle Cloud

On a CentOS installation over Oracle Cloud, when running yum or dnf, you may get the error: Failed loading plugin “osmsplugin”: No module named ‘librepo’

To fix this error install the python3-librepo package with:
sudo dnf install python3-librepo