How to extract RAR file in Linux

To install unrar on Ubuntu, run

To extract a rar file, run

Install SSL for Cpanel Server Hostname

Cpanel will provide Free SSL for server hostname if server hostname resolve to servers main IP address and server have valid cpanel license.

Cpanel will check for hostname SSL when upcp runs. This is run once everyday.

You can manually run SSL check by running

If you have a paid SSL, you can install it in

WHM > Service Configuration > Manage Service SSL Certificates

Limit Access Using htaccess

To limit access to a folder using .htaccess, create .htacess file with following content.

YOUR_IP_HERE = Replace it with your actual IP.

You can white list IP range by entering CIDR notation for the IP range.

Here is .htacess i use on one of my web sites admin folder.

Nginx CloudFlare restore real ip

When using Nginx Behind Cloudflare, logs and web applications show cloudflare sever IP instead of visitor IP.

To fix this, edit

Inside “http” section, add

You can get updated list of CloudFlare IPs from

https://www.cloudflare.com/ips/

Restart Nginx with

Example Nginx Config

https://gist.github.com/serverok/fef5c76bf96f8e016bf64095da4a64dc

Start meguca on boot

Meguca is an open source annonymouse imageboard written in Go Lang and Node.js

https://github.com/bakape/meguca

To start Meguca on boot, you can use monit

Create a monitoring script with

/meduca is where Meguca is installed.

Create a config.json file with

Add following content

reverseProxied is set to true because my installation is behind reverse proxy (CloudFlare).

Make changes to config settings as requires.

Create a user

Change ownership of meguca files

nameserver

Verify if a name server is registered with

nslookup

To find IP of a domain, use

To find MX record for a domain, use

To see TXT records, run

Start a program after reboot using cronjob

To start a program using cronjob, create a cronjob like

On system boot, the command “/root/start.sh” will be executed.