Check Dedicated Server Specifications | check raid

This post explains few quick linux commands to check server specifications. I tried to explain every command output in this post as follows:

Check SSD

# cat /sys/block/sda/queue/rotational

if above commnad returns 1 it means HDD else if it returns 0 then it is SSD.


Check RAM

# cat /proc/meminfo

MemTotal: 131778740 kB

Above command returns huge list of outputs, however you can ignore all and should focus on 1st line which tells about total Memory. You can convert KBs to MBs at google in order to get values in MBs.

Read More

Opencart 3.x Image src unknown error

Few days ago one of our client reported an error on his opencart store that was working perfectly in past. However suddenly it started giving error with the product images. He was not able to upload, edit, view images under admin panel as well as on front-end.

Images were failed to load on web site, and when i checked the source of images i found unknown or empty src. I tried to fix the errors while googling this issue but could not find any solution. Apparently i found out there is an image compressor php script included in the opencart. I just opened it at following location :

Front-end: Read More

Remove IPtables rules from rescue system

Hey, this article explains how you can remove IPtables rules if they are blocking access to the server. This usually happens if you wrongly configured IPtables or got any port blocked mistakenly like SSH port. Following the below steps to get it fixed.

Operating System : These steps are tested on Centos 6, however not tested on other operating systems.


  1. Boot your server into rescue system. (If you cannot boot it you can ask your server provider to do this for you.)
  2. Login to rescue system via SSH and then:
    1. List hard disk partitions:
      1. run:
      2. # fdisk -l
      3. Output will be like:
      4. Device    Boot     Start       End    Blocks  Id System/dev/sda1 *         2048   1026047    512000  83 Linux/dev/sda2        1026048 234436607 116705280  8e Linux LVM/dev/sda3      234436608 234440703      2048  83 LinuxDisk /dev/mapper/vg-root: 102.6 GiB, 110125645824 bytes, 215089152 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/vg-tmp: 1 GiB, 1073741824 bytes, 2097152 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
      5. This is your root partition : Disk /dev/mapper/vg-root: 102.6 GiB
      6. Now mount this partition on /mnt point:
        # mount /dev/mapper/vg-root /mnt
      7. Nothing will be shown if above command succeeds.
      8. Now navigate to the sysconfig directory where iptables rules are saved:
        # cd /mnt/etc/sysconfig
      9. There is file called iptables which stores all the iptables rules. You just have to rename it:
        # mv iptables iptables-old
        # mv
      10. Now you have changed iptables rules and ready to reboot your system into original operating system, but you need to unmount the partition as follows:
      11. # cd
      12. Read More

Testing http2

http2 is the latest protocol  everyone is migrating on it due to its reliability and speed. So my client asked me the same to enable it for his server, i had to enable http2 protocol on one of my client’s dedicated server. After enabling it i faced very strange issue that took my couple of hours figuring out the main cause.

I enabled http2 and then tried to access web site with local chrome browser (Version 65.0.3325.181 (Official Build) (64-bit)) it returned http/1.1 all the time in network tab. Then i tried accessing it on my remote desktop server having windows 2012 standard version i saw all the things work fine and in network tab i saw h2 which means it is working.

So i searched on google and came to the conclusion it is either network (ISP), antivirus or firewall which is blocking the access via http2 and reverting back to http/1.1 protocol. Here are 2 URLs to check for http2 support locally and on web server.

Read More

Switching between litespeed and apache from ssh | switch from litespeed

Today i will tell you the ssh command to switch between apache and litespeed web servers. You must have litespeed installed on the server.

This command is useful when you have apache and litespeed installed and your cPanel license is no more operational or expired. You can still swtich between web servers by executing this command via terminal/ssh.


Login to your server with root access via ssh terminal and run followimg ssh command:

To switch from litespeed to apache:

sh /usr/local/lsws/admin/misc/ apache

To switch from apache to litespeed:

sh /usr/local/lsws/admin/misc/ lsws

Please note you should write correct path of your litespeed installation directory.