When creating a new server for a client that wants to run Nginx, you’ll need to adapt the virtual host configuration to properly serve requests. After modification the server block [ … ]
Category: Real Time Concepts
PHP-FPM and APC with nginx
Overview As Nginx does not have an equivalent to Apache’s mod_php, we need to use PHP-FPM to handle PHP interpretation. Nginx is then configured to proxy requests matching *.php to [ … ]
Nginx
Installation RHEL/CentOS # vim /etc/yum.repos.d/nginx.repo [nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key [nginx-mainline] name=nginx mainline repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key Now you can install the service and configure it [ … ]
Nginx Setup with PHP-FPM
Introduction PHP-FPM Pools PHP-FPM’s architecture involves a parent process, running as root, that spins up “pools” of child processes. To illustrate, here is ps output with 2 pools: # ps [ … ]
Nginx Setup with PHP-FPM (Archived)
Nginx and PHP-FPM Prerequisites Installation of Nginx Installation of PHP-FPM Basic configuration of Nginx Basic configuration of PHP-FPM Basic configuration in Nginx Using upstream to define our PHP-FPM socket Within [ … ]
Nginx Performance Tuning
worker_processes and worker_connections Nginx Event Model On Linux, Nginx uses the efficient epoll event model. This involves a child worker process with a single thread responding to I/O events (network, [ … ]
Nginx map Directive
What is it? The nginx map module allows you to map a set of values into a different set of values, storing the result in a variable. The nginx map [ … ]
NginX installation and support
Installation yum install epel-release yum install nginx chkconfig nginx on service nginx start Edit /etc/nginx/nginx.conf and change this to the number of physical CPU cores: worker_processes 1; Configuration Apache vs [ … ]
Nginx and lsyncd proxy_pass
We create three `server` blocks: One to redirect http to https One to decide if requests should go to web1 or be served locally One to serve local wordpress nginx [ … ]
FastCGI (non-PHP) on nginx
Overview Most users of nginx are going to configure it to run PHP scripts via . However there are some PHP-FPM who wish to run Perl (or another language) through [ … ]