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/

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
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
Tutorial

How to get visitor ip on cPanel NGINX Reverse Proxy with PHP

If you are using cPanel NGINX Reverse Proxy setup you may notice PHP $_SERVER['REMOTE_ADDR'] is returning server main IP address instead of visitor IP address.

To get visitor IP address use $_SERVER['HTTP_X_REAL_IP']

Source: https://stackoverflow.com/questions/44145688/remote-addr-ip-from-user-instead-of-nginx-reverse-proxy-server

Categories
Tutorial

How to edit Windows 11 HOSTS file

How to edit the hosts file on Windows 11: https://websiteforstudents.com/how-to-edit-windows-11-hosts-file/

In short, open Windows Terminal (Admin) or Command Prompt in Administrator Mode and type:

notepad.exe c:\Windows\System32\Drivers\etc\hosts
Categories
Tutorial

How to install watch faces on Haylou Solar

How to install custom 3rd party .bin watch faces on Haylou Solar: https://amazfitwatchfaces.com/forum/viewtopic.php?f=14&p=8339

Categories
Tutorial

DKIM Selector for CyberPanel

DKIM Selector for CyberPanel hosted web sites: default._domainkey

Details: https://cyberpanel.net/blog/2018/01/28/how-to-setup-spf-dkim-and-dmarc-inside-cyberpanel-manually/