How to Install Magento NGINX – Part 01

Here we’ll learn to install Magento NGINX. Magento permits nginx 1.8 or any latest version. Though the installation requires the updated version of php-fpm. But the process of installation varies depending on the operating system we’re using for installation.  Also there are two operating systems widely in use for Magento 2. Being specific, Ubuntu 16 & CentOS 7.

However, our hosting provides the best Mage SSD cloud hosting & servers. Both of our pro & plus hosting plans include featured services such as Aspiration CDN, Web development & transfer support etc. Merry X-mas!!!                                                  Tanzia Farin Chy – Aspiration Hosting

Let’s start with installing Magento nginx, PHP & MySQL step by step in Ubuntu 16:

Installing Magento nginx

So, enter the following code in to the command prompt to install nginx:

apt-get -y install nginx

Next we’ll install Magento right after the installing Mage nginx. Later we’ll use a sample configuration to setting up nginx.

Install Magento nginx – php-fm

Further we need to add some PHP extensions to configure Mage efficiently. If we install Magento nginx the php-fm extension is must have to function properly. Following are the steps to install Magento ngnix – php-fm:

  • First we’ll install php-fpm & php-cli. So, enter the following code in to command prompt:

apt-get -y install php7.0-fpm php7.0-cli

  • Secondly using any editor open the php.ini files. Here the files are mentioned below:

vim /etc/php/7.0/fpm/php.ini

 vim /etc/php/7.0/cli/php.ini

  • Now edit both files the same as the following lines using editor:

memory_limit = 2G

 max_execution_time = 1800

 zlib.output_compression = On

***Further Note: While testing Mage we recommend to setup the memory limit to 2G.***

  •  Next exit the editor by saving the changed made.
  • Finally we’ll restart php-fm by entering the following codes in command prompt.

systemctl restart php7.0-fpm

Install Magento nginx – MySQL – install & configure

Now we need to install & set up the MySQL for Magento. So follow our article to learn about MySQL installation & Configuration.

Current reading Part 01| Part 02