Nginx

Sample Nginx Configuration for Magento 1

Below you can view sample Nginx configuration for Magento 1 applications.
Note: This article is based on Magento Community/Open Source version 1.9.

Sample Nginx Configuration for Magento 2

Below you can view sample Nginx configuration for Magento 2 applications. For security reasons, you should ensure that the Magento 2 document root is set to the pub subdirectory to protect root directory assets, such as the app directory.
Note: This article is based on Magento Open Source version 2.2.4.

Wrong Webroot with Atomic Deployments and PHP FPM

If using Nginx and PHP FPM as a web server solution, then you might have experienced a strange issue involving atomic deployment strategies for your web application.
Atomic deployment solutions, such as Capistrano, create a symlink to the current application release directory. When a new deployment takes place, Capistrano simply updates the symlink to …

Useful Nginx Configuration

The way the Nginx web server works is determined by its configuration files. If running a PHP application, some useful Nginx configuration code snippets can be seen below.
To route all requests through through an index.php file.
location / {
try_files $uri $uri/ /index.php?$args;
}
If running a live application, you …

Configuring Websites with Nginx on a Mac

Configuring websites with Nginx requires you to add server blocks. These are blocks of configuration that are kept in individual files associated to each website.
Each configuration file should be kept in a sites-available directory. This directory should be located in the same directory level as the nginx.conf file.
As an example, let’s add some …

Install Nginx on a Mac

Nginx is a web server that can be installed locally to help run websites on your computer. To install Nginx on a Mac, it is recommended that you install it using homebrew.
If you haven’t already installed Homebrew, you can run the following command.
$ ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Continue on by installing Nginx …

Install an SSL Certificate on Linux

To install an SSL certificate on linux-like servers without using a control panel, SSH into your web server and run an openssl command to generate a CSR (Certificate Signing Request). The CSRidentifies which server will use your certificate, as well as the domain names (common names) you’ll use for the certificates.
The command will generate …