Vallabh Kansagara <vrkansagara@gmail.com>

Vallabh Kansagara

A day by Software Engineering ,Open source contributor at @GitHub with various projects.

From the Firehose


Nginx full configration with best performance Aug 13, 2019

in Linux, Nginx, Web server

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 full configration with best performance

Nginx minimal configuration Aug 14, 2019

in Linux, Nginx, Web server

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...

Nginx minimal configuration

Linux user permission right way Aug 13, 2019

in Featured, Laravel, Linux, Magento, Performance

To solve linux user and group permission issue for any kind of project.

First of all find the right user and right group which is executing that process.

Silver bullet of linux user permission.

    sudo lsof -iTCP -sTCP:LISTEN -Pn
    export OWENRE=$(whoami)
    export GROUP=$(whoami)

Use above command to grap process and find whois the right owner of that process and export variable as OWENRE and GROUP

    sudo chgrp $GROUP * -Rf
    sudo chown $OWENRE * -Rf
    sudo find ./ -type f -exec chmod 664 {} \;    
    sudo find ./ -type d -exec chmod 775 {} \;

Rre-read image for more understandin...

Linux user permission right way