How To Add Swap on Ubuntu 14.04

One of the easiest way of increasing the responsiveness of your server and guarding against out of memory errors in your applications is to add some swap space. Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Please …

How to chroot ssh user using Jailkit

Jailkit is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. Jailkit is known to be used in network security appliances from several leading IT security firms, internet servers from several large enterprise organizations, internet servers from internet service providers, as well as many smaller companies and private users that need to secure …

How To Set Up HTTP Authentication With Nginx On Ubuntu 14.04

Step 1: Install Apache Utils To generate encrypted password for the nginx we need to use apache2-utils, use this command : Step 2: Create username & password create a .htpasswd under the folder we need to protect or under your website root directory : Later it will prompt you for a password This htpasswd file must be own by current …

SSHD error: buffer_get_ret: trying to get more bytes 257 than in buffer 76

If you have run similar error in your /var/log/auth : Jun 28 08:01:06 server sshd[2484]: error: buffer_get_ret: trying to get more bytes 257 than in buffer 76 Jun 28 08:01:06 server sshd[2484]: error: buffer_get_string_ret: buffer_get failed Jun 28 08:01:06 server sshd[2484]: error: buffer_get_bignum2_ret: invalid bignum Check your .ssh/authorized_keys file and make sure your key is in one line only, start …

View Post

Install newrelic nginx plugin on Ubuntu

Add nginx repository to your /etc/apt/sources.list (replace codename with your ubuntu codename ex: 14.04 – trusty ): Download nginx PGP key and add it to your server (eliminate warnings about missing PGP key during installation) : Update your repository and install the plugin : Insert your newrelic licence key on your newrelic nginx plugin page: And finally start your agent with …

View Post

Linux list file & folder size, sort by size

Let’s say i have a large number of files stored in /var/www directory. How do I sort and print sizes using du -h command under Ubuntu Linux LTS version 14.04 or any other Linux distributions? The code is : To list disk usage and sort :

[emerg]: bind() to 0.0.0.0:80co failed (98: Address already in use)

Today trying to configure my nginx and got this strange error : which is strange cause i remember that i got no other program using that port, the solution is simple : This will kill process on port 80, and then try starting nginx again:   PS : incase you also got Kill also process on port 443 before starting nginx …

curl port 443 connection refused by nginx

On my process of migrating our new server to nginx from apache i got an error : curl: (7) Failed to connect to my.server.url port 443: Connection refused My nginx conf file looks no problem, and doing curl from another server also running well. After some research on Google looks like the problem is with my server DNS, the DNS …