Tag  |  apache

Photo by xmodulo

How I Migrated From Apache to NGINX

Steps to Migrating from Apache2 to NGINX

First, we will install NGINX and PHP-FPM:

sudo apt-get install nginx php5-fpm

Next, we will need to update the PHP-FPM config at /etc/php5/fpm/pool.d/www.conf

sudo nano /etc/php5/fpm/pool.d/www.conf

My server has 4 cores, so this is what my www.conf file looks like:

user              www-data;
worker_processes  4;
worker_cpu_affinity 0001 0010 0100 1000;
error_log         /var/log/nginx/error.log;
pid               /var/run/nginx.pid;

events {
    worker_connections  2048;