SOLID Principles

In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.

S.O.L.I.D. STANDS FOR:

    S — Single responsibility principle.
    O — Open closed principle.
    L — Liskov substitution principle.
    I — Interface segregation principle.
    D — Dependency Inversion principle.

S — Single responsibility principle

In programming, the Single Responsibility Principle states that every module or class should have responsibility over a single part of the functionality provided by the s...

Nginx full configration with best performance

NGINX Tuning For Best Performance

This post assume that you are linux user and logged as root user.

This post is wrriten by mearginging many configuration files at once so you may find same configuration at nginx official websiteas well.

Nginx tune up are dived into two major part

  1. Nginx main configuration file called as nginx.conf
  2. Another one is called as virtual host file wich located in eather conf.d directory or sites-enable folder based on linux flavour.

Backup your original configs and you can start reconfigure your configs. You will need to open your nginx.conf at /etc/nginx/nginx.co...

Nginx minimal configuration

Basic nginx configuration for with php-fpm as reverse proxy


# redirect all http traffic to https
server {
    # Listen port 80 at ipv4 and ipv6
    listen 80;
    listen [::]:80;

    # server name would be your server FQDN or dns host name or ip address seperated by space
    server_name example.com;

    return 301 https://$host$request_uri;
}

server {

    # Listen port 443 at ipv4 and ipv6
    listen 443 ssl;
    listen [::]:443 ssl;

    # server name would be your server FQDN or dns host name or ip address seperated by space
    server_name example.com;

    root /var/www/html;

    ad...