Server Software Technology

Ubuntu 16.04 / Apache2 / NGINX / PHP7.0 FPM / MariaDB / Varnish

Using NGINX reverse proxy along with the Apache webserver improves the performance of the websites significantly! So, I decided to give it a try. I have configured a lot of webservers earlier with Apache and PHP or Lighttpd and PHP modules. However, I was doing this type of setup for the first time!

I decided to configure a server with Linux – Ubuntu 16.04 LTS, Apache2 as a webserver, 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. In this article, 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.

Initial Server Setup and Configuration

First of all, I’ve used a 2GB dedicated server with Ubuntu 16.04 LTS version from DigitalOcean to test the setup. After logging in to the server with “root” (or with a sudoer user), first, you have to check if the environment variables are set properly or not. This is to avoid some warnings during other modules installation. Many times, the locales are not set properly by the hosting providers while deploying the server. Therefore, Run the following commands to configure it properly.
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

Technology Web Development

HTTP Status Codes for RESTful APIs

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.

1xx = Informational – It means the request has been received and the process is continuing.
2xx = Success – It means the action was successfully received, understood, and accepted.
3xx = Redirection – It means further action must be taken in order to complete the request.
4xx = Client Error – It means the request contains incorrect syntax or cannot be fulfilled.
5xx = Server Error – It means the server failed to fulfill an apparently valid request.

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.

Software Technology Web Development

How to create a jQuery plugin – basic concepts

jQuery is a popular term known to the web developers and web designers. We use various jQuery plugins to serve different purpose and functionality of a website. Nowadays, lots of jQuery plugins are available on the internet for almost every functionality needed. You can easily find a required plugin here ““. Web developers and designers tend to just download the plugin from the internet and use it in the web page to achieve the functionality. Very few of us need to write custom jQuery script blocks to do some special or customized functionality. Rather than writing scattered jQuery script blocks, it is always a better idea to create jQuery plugin to wrap them up in a method and use the custom jQuery plugin when needed! That keeps the web page clean and the script is more manageable. So let’s learn the basic concepts and anatomy of a jQuery plugin and how to write your own plugin.

Internet Software Technology

Postfix configuration in ubuntu

Postfix is a free and open-source mail transfer agent. It is the most suitable, easy to configure, and widely-used Sendmail programme for a dedicated web server. I’ve a dedicated server hosted by Digital Ocean and the server is configured with LAMP stack. Recently I needed an email with the domain to verify the domain with Sendgrid – a transactional email platform. So I’ve googled around and found this mailing software as the most suggested one. Then I searched a bit more for the setup and configuration and it seemed very easy to me.

Software Technology Web Development

PHP 7 – what’s new and feature spotlight

You might already know that PHP 7 is now a stable release. PHP 7 is a new major version, still it has very few backward incompatible changes. However, lots of functions have been deprecated. This is the most important version update for PHP since the release of PHP 5 in the year of 2004. Drastic performance improvements along with reduced memory consumption will supercharge your web application. The new Zend Engine 3.0 enables your website with 2x faster performance and 50% better memory consumption than PHP 5.6 which allows you to serve more concurrent visitors without adding a new hardware. PHP 7 is based on the PHPNG AKA PHP Next-Gen project, that was led by Zend. Also, PHP 7 now has support for 64-bit Windows system which was lacking in 5.x version. However, it was already supported in the Linux 64-bit platforms and local LAMP stacks. Besides the performance enhancements, PHP 7 has introduced many new features, like new operators, type declarations, anonymous classes, namespace imports, etc.

Internet Software Technology Web Design Web Development

Why you should try Google Chrome Canary

Google Chrome Canary – Get on the bleeding edge of the web

Google Chrome Canary is a likewise early dev channel of Google’s flagship browser Chrome. It is a frequently updated experimental build and has the newest of the new Chrome features.

You may know that many software has multiple dev and beta releases before a stable version release. This is to have it tested by the early adopters. They provide feedback and test reports after using it. Then after eliminating almost all the bugs, the stable version is released.

Google Chrome Canary is the most early one of the four versions of Google Chrome: Canary, dev, beta, and stable. Google Chrome Canary is purely meant for the developers and designers and the early adopters. The most attractive part is you can have both the Canary and Stable Chrome version installed on your system side-by-side. That opens the option for many users to use both the dev and stable channels.

You can download it from its official page.

Software Technology Web Development

How to setup and configure phpMyAdmin on Ubuntu

If you are a web-developer on LAMP platform, then it would always be a requirement for you to install and configure phpMyAdmin on your Linux environment. If you work mostly in a local LAMP environment, like XAMPP, MAMP, WAMP (you can check out the article on XAMPP vs WAMP vs MAMP to decide which platform suits your need better) then you will have it installed and configured already. If you have installed Apache, PHP, and MySQL separately in your local Linux/Windows/Mac system, then you can download the latest phpMyAdmin package from their official website.

Hardware Technology

How to setup a dedicated web server with Ubuntu Linux distribution

Dedicated web server is something that I should try a lot earlier! I have a couple of personal blogging websites and some adventure sports/travel information based websites built in WordPress. This website is one of those as well. My websites were in a 2GB shared Linux based hosting server provided by the Godaddy. As usual, due to the shared hosting service, I was facing a lot of slowness in website loading. It is not that the page content was loading very slowly. Rather the page waiting time was huge than the actual page loading and rendering time! This generally happens with most of the shared hosting services. This is due to the overhead created by imbalanced server vs. shared users ratio, which eats up the server resources in an unmanaged way. So finally, I decided to migrate my sites to a 2GB cloud-based dedicated hosting server with SSD drive. I choose the Linode provider for the hosting. Now my websites are running comparatively smoother and faster than earlier. So I thought it would be a great idea to share my thoughts here on cloud-based dedicated server benefits. And also thought to share the setup and configuration steps of the server, that may help many people in future, like me 🙂

There are many other renowned cloud-based dedicated web server providers as well, like Rackspace, DigitalOcean, Amazon EC2 etc.

Dedicated web server – why should we consider?

Some of the major benefits of cloud-based dedicated hosting server are:

  • The resources are not shared with multiple users in an unmanaged way. Though full dedicated web servers and cloud-based dedicated web servers are different, still you get the resources that actually you pay for.
  • Fully customizable with lots of extra components that shared hosting providers generally do not allow to install, e.g. Memcached, APC etc. PHP components. You can install GIT version control and many other utilities that you may require for advanced website management.
  • An SSD-based hard drive which makes read/write operations much faster which further ensures faster I/O response.
  • Easily scalable to a higher or a lower plan as per your requirement, with flexible hourly billing accumulation and monthly charge.
  • Properly maintained hardware resources and scheduled server maintenance.

I have switched to the cloud-based dedicated web server for the first time from a shared hosting server. So my thoughts may be a little bit biased :p. But still no one can deny that dedicated web servers are far better than shared web servers. Obviously, if you are not interested towards a low-cost solution! Dedicated web server is much high cost than regular shared hosting.

Technology Web Development

Top 50 Most Useful and Frequently Used SSH Commands

Secure Shell or SSH is a well-known term to whom that manages UNIX/Linux based servers. It provides safe and secure remote login to the servers and allows running numerous useful SSH commands. It is basically a command line tool in UNIX type of system, e.g. command prompt in windows. You can use Terminal in Mac and PuTTY in Windows to access servers via SSH. Here is a list of most frequently used SSH commands that may become useful when you need.

Internet Technology Web Development

PHP MVC Frameworks Comparison 2015

I’m in the IT industry for over 10 years now and doing PHP programming for a long time. I’ve started my career with PHP 4 and obviously reached up to a point of doing Spaghetti Code. I bet, 80% of the PHP developers gone through this phase. However, when we learned using structured coding with a fragile OOP concept it becomes harder to write the codes but easier to manage it.

There were PHP frameworks as well. With the release of PHP 5.x, many good PHP frameworks emerged and many got upgraded. PHP frameworks are great for rapid development as they include lots of prewritten class methods and helper functions that significantly reduces the amount of code you have to write your own. So obviously this saves the development time altogether.

But as said earlier, there are many PHP frameworks available online among which, 90% are open source. Before you choose for a framework, you need to check at least three aspects, one – performance (the most important part), two – purpose (do not use over featured frameworks that your project does not need), and three – ease of use and inbuilt utilities. And the common is obviously you have to learn that framework syntaxes.

I’ve used CakePHP, Codeigniter, and Laravel myself. So I thought to put together a comparison (obviously did some research from the online sources) of the frameworks for the sake of making a decision faster. Here is a survey result available from Sitepoint as well. Another good framework introduction available online (a bit old though) by Mashable.