Install JQ on Windows

The Windows binary file for jq can be downloaded fromhttps://stedolan.github.io/jq/download/ At the time of writing, the latest version ishttps://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe If you want the jq command to be available from everywhere within windows there are 3 steps to be followed: $jqFolderPath = “C:\Program Files\JQ” $jqExePath = “$jqFolderPath\jq.exe” $jqDownloadUrl = “https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe” # Step 1: Create the folder … Read more

Merge the content of multiple .htaccess files in one

The script will search the current directory for all htaccess files and will combine in a single text file. find . -name ‘.htaccess’ -exec echo “### START Imported from”.{}.”###” \; -exec cat {} \; -exec echo “#### END Imported from “.{}.”###” \; -exec echo”” \; >> all-htaccess.txt

Solar Winds Spam Experts Rejection Classification

Messages that are rejected without being quarantined Some messages are rejected immediately without being quarantined. This happens at SMTP level and the rejection is permanent. For example this will happen for Incoming messages in the following scenarios: Have an invalid recipient or domain Do not use TLS (if enforced on the incoming domain) Do not … Read more

.htaccess exceptions for AutoSSL and Let’s Encrypt

for Let’s Encrypt RewriteEngine On RewriteCond %{REQUEST_URI} !\.well-known/acme-challenge RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] for cPanel AutoSSL RewriteEngine On RewriteCond %{REQUEST_URI} !\.well-known/pki-validation RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Fix cPanel account permissions script

How to use PeachFlame script to fix cPanel account permissions: To get the fixperms script, simply wget the file from GitHub and make sure it’s executable: wget https://raw.githubusercontent.com/PeachFlame/cPanel-fixperms/master/fixperms.sh chmod +x fixperms.sh Fixperms – for all of the users If you would like fix the permissions for every user on your cPanel server, simply use the … Read more

Clear systemd journal /var/log/journal

Systemd logs that are stored in /var/log/journal can be cleared by using journalctl command. Here are some useful commands To find out the size of the log folder: du -sh /var/log/journal/ Clear systemd journals older than n days: journalctl –vacuum-time=30d Clear systemd journals if they exceed n storage space: journalctl –vacuum-size=1G

Use RemoteBox on Ubuntu

Download RemoteBox wget http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-2.6.tar.bz2 Ensure the required dependencies are installed as follows: apt-get install libgtk2-perl libsoap-lite-perl freerdp-x11 tigervnc-viewer To launch RemoteBox, unpack the previously downloaded RemoteBox tarball and run the ‘remotebox’ executable. vboxweb-service need to be installed and active on the target server. The following article describe how to install a Headless Server on CentOS … Read more

Reset Nextcloud password in CLI

Login via SSH to the server $ sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin Enter a new password: Confirm the new password: Successfully reset password for admin

VirtualBox Guest Additions not working in Lubuntu 17.04 – Solved

Environnement: Host OS: Windows 10 x64 VirtualBox Graphical User Interface Version 5.1.26 r117224 (Qt5.6.2) Guest OS: Lubuntu 17.04 VBOXADDITIONS_5.1.26_117224 Problem: I manually installed VirtualBox Guest Additions from VBOXADDITIONS_5.1.26_117224 ISO and restarted the guest. The bidirectional clipboard and the drag and drop still not working. Solution: Installation of Guest Additions from Ubuntu repository. Command: sudo apt-get install virtualbox-guest-dkms … Read more

cPanel not starting with Internal Server Error – fix

The problem: All websites are down with Internal Server Error 500 Symptoms: Cpanel wasn’t loading with the following error: Internal Server Error 500 Can’t fork: Cannot allocate memory at /usr/local/cpanel/Cpanel/SafeRun/InOut.pm line 40. cpsrvd/11.62.0.15 Server at hostname.example.com How I fixed it? First of all I was trying to increase this limit by searching for “Max cPanel … Read more