How to change the SSH port of your Linux server

This article is for those who are concerned about their server’s security. You can try to change the SSH port as an additional layer to strengthen the security of your server. Therefore, changing the default SSH port (22) to something else will make it hard to guess for the hackers.

You need to follow a couple of simple steps to achieve this. The Linux distribution that you are using, Ubuntu or CentOS, won’t matter here.

Continue reading “How to change the SSH port of your Linux server”

How to install and configure NGINX, MariaDB, PHP-FPM v7 (LEMP stack) on CentOS 7

This article is about how to install LEMP stack on your hosting. LEMP stack is a set of open source software that enables the hosting to serve dynamic web pages. LEMP stands for Linux OS, NGINX (pronounced as ENGINX), MySQL database, and PHP.

LEMP stack on a dedicated/VPS server is very popular. In this article, we are going to cover the full setup process. Here are the steps that we will be following: CentOS 7 common steps before installation, Install and configure NGINX web server, Install and configure the MariaDB database server, Install and configure PHP-FPM v7 as a server-side programming language, Install PHPMyAdmin, Install SSL for your domain.

Continue reading “How to install and configure NGINX, MariaDB, PHP-FPM v7 (LEMP stack) on CentOS 7”

HTTP Status Codes for RESTful APIs

All the HTTP status codes are a part of the HTTP/1.1 standard. The Internet Assigned Numbers Authority (IANA) maintains the official registry of the HTTP status codes.

HTTP status codes are the response codes supplied by the web servers against any HTTP request. These codes are 3-digit integer values where the first digit of the code specifies one of five classes of response. There are different series of HTTP status codes. Each status code series have their own status category and each status code has a specific meaning.

Continue reading “HTTP Status Codes for RESTful APIs”

Composer and Packagist – PHP Dependency Management Tool

Composer is an application-level PHP dependency management tool. It will seamlessly install and update the packages that you declare as your PHP project’s dependencies. Composer pulls the latest packages from the PHP package repository, Packagist.

However, it is not a package manager. Nils Adermann and Jordi Boggiano have developed the tool and first released it on March 2012. Composer manages the packages within a specific directory by default, not globally. It does have a global command and support for the global project as well. In general, Composer handles package dependencies per project basis. The idea behind Composer is based on the node‘s npm concept.

Continue reading “Composer and Packagist – PHP Dependency Management Tool”

How to install and configure Apache2, MariaDB, PHP-FPM v7 (LAMP stack) along with NGINX reverse proxy and Varnish cache on Ubuntu 16.04

I’m a technology enthusiast! So I always try to keep myself up to date with the latest technology trends and happenings. I came to know that having NGINX as a reverse proxy for Apache, improves the performance of the websites. So I decided to give it a try.

I have configured many web servers earlier with Apache and PHP or Lighttpd and PHP modules. But this type of setup I was doing for the first time. I decided to configure a server with Linux Ubuntu 16.04 LTS, Apache2 as a web server, NGINX reverse proxy for Apache2, PHP7.0 FPM module for processing server-side PHP scripting, MariaDB server (a community-developed fork of the MySQL), and some other necessary modules to run the server independently. I will describe the whole procedure that I’ve followed. I will also list all the SSH commands that I’ve used while preparing the server.

Continue reading “How to install and configure Apache2, MariaDB, PHP-FPM v7 (LAMP stack) along with NGINX reverse proxy and Varnish cache on Ubuntu 16.04”

LAMP Stack – XAMPP vs WAMP vs MAMP – What Should We Use

Why I’m writing this? Obviously, because I’m a PHP programmer 🙂 and I felt how hard it is to decide which bundle (LAMP stack) should be used. I’ve worked on Linux around 4-5 years ago, then Windows for a long time, and currently working on a Mac platform.

I’ve used all these three bundles over a different time period. I’m in the development industry for over 10 years and I think now I’m in a position to do a side-by-side comparison of these tools so that the newcomers seek some help from this article.

Continue reading “LAMP Stack – XAMPP vs WAMP vs MAMP – What Should We Use”

How to optimize MacBook Pro performance

Well, I thought it’s worth to put the topic here on how to optimize MacBook Pro performance. I’ve recently migrated from Windows 8.1 platform to Mac OS X Yosemite platform. I’ve used Windows (Windows XP, Windows 7, Windows 8/8.1) over six years, and before that, I’ve also used Linux (Red Hat) platform for two years.

I’ve got a MacBook Pro with 13″ Retina Display, 8 GB of RAM, and 120 GB SSD. It’s a pretty good configuration! But still, the pc was lacking performance. It was becoming unresponsive, a bit slow, laggy typing, etc. symptoms were appearing. So I started to find out the reasons in the web and gathered the knowledge on how to optimize MacBook Pro performance for OS X.

Let me tell you that I’m in a field of web development, so I need to use many tools simultaneously, e.g. NetBeans IDE, Sublime Text editor, Open Office suite, mac terminal multiple SSH windows, at least two parallel browsers i.e. Google Chrome and Firefox/Safari, Skype chat, XAMPP local apache and MySQL services, Jing screen capturing tool, etc. Now you have started thinking that the culprit for the slowness is me rather than the mac, right! But I still believed that it can be fixed and below is how I did it.

Continue reading “How to optimize MacBook Pro performance”