August 2020
« Apr    

NGINX : www redirection

Here are the simple Nginx rewrite rule to redirect all non www traffic to www domain.

# enforce www (exclude certain subdomains) #if ($host !~* ^(www|subdomain)) #{ #   rewrite ^/(.*)$ $scheme://www.$host/$1 permanent; #}

I took it from here as I see it’s the first blog I see the most of theNginx re-write rules.

Useful commands to find the hacker programs and OS behavior

Recently I got an opportunity to work with certain hacked servers which is compromised due to poor administration. As we know Heartbleed. shellshock and poodle attack are come out recently.

1. Heartbleed vulnerability — due to buggy Openssl relase – resolved by updating the package to latest 2. Shellshock : a buggy and hidden […]

IPTables : How do I block access from a country

Recently one of the server was attempted to hack from various countries especially from Ukranine, France and China even though all our customers are located in US. So we do not need to open the web access to any of these countries as they are not belonging to our customer region.

After a few Google […]

VNC Viewer error : No Matching security types

We are trying to access a Ubuntu system over the remote desktop connectivity for a long hours. We can able to connect/access Remote desktop from Ubuntu to Ubuntu. But neither windows or any other VNC viewer from other OS. We needed to access Ubuntu Desktop remotely from any system.

How do I enable Remote […]

configure: error: C compiler cannot create executables

While I’m installing nagios 1.4.14 version on a new server, I got the following errors,

[root@fc-db02 nagios-plugins-1.4.14]# ./configure checking for a BSD-compatible install… /usr/bin/install -c checking whether build environment is sane… yes checking for a thread-safe mkdir -p… /bin/mkdir -p checking for gawk… gawk checking whether make sets $(MAKE)… yes checking build system type… x86_64-unknown-linux-gnu […]

Running multiple PHP versions on Apache

One of the old project can be run only on php 5.2 version and further development is happening on the same version. This project hosted in a dedicated WHM/Cpanel server. Unfortunately we will not get the php 5.2 option in EasyApache as they deprecated that version. Php5.3 or later cab be available there. So I […]