Hey, Nginx gain popularity because it lightweight and scalability. Here I will provide a short how to set up nginx running php with php5-fpm(fastcgi process manager) in ubuntu 12.04
#apt-get install nginx php-fpm
Config file for php is at /etc/php5/fpm/pool.d/
This you can control how php process run, tcp or unix socket
The config file for nginx to run php is you need the following configuration to location block :
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
For configuration optimizing please see this link :
http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/
ไม่มีความคิดเห็น:
แสดงความคิดเห็น