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/
A brief short linux how to and problem solving. This blog is intended to be a reference by summarizing from reliable data source and my experience. Readers should have a basic understanding about linux.
แสดงบทความที่มีป้ายกำกับ cgi แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ cgi แสดงบทความทั้งหมด
วันอังคารที่ 22 พฤษภาคม พ.ศ. 2555
วันอังคารที่ 31 พฤษภาคม พ.ศ. 2554
apache http auth with cgi
If you are using apache http auth with cgi, you have a few more things to do.
You need to enable .htaccess
RewriteEngine On
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
วันศุกร์ที่ 5 มีนาคม พ.ศ. 2553
apache with fcgid
Once, I used gentoo with apache(worker) + phpmod as a webserver. After switching to ubuntu, I've found that phpmod is not stable with apache(worker), this is not a problem with gentoo b'coz u can customize everything by yourself.
Up to this point ,there are 2 choice for ubuntu apache works with php
1) use apache prefork + phpmod
2) use apache worker + cgi + php
Up to this point ,there are 2 choice for ubuntu apache works with php
1) use apache prefork + phpmod
2) use apache worker + cgi + php
More description about fcgid/fastcgi http://www.seaoffire.net/fcgi-faq.html
I found the following study show that fcgid might be a good choice. And, it is.
http://2bits.com/articles/apache-fcgid-acceptable-performance-and-better-resource-utilization.html
For fcgid reference for apache :
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
I found the following study show that fcgid might be a good choice. And, it is.
http://2bits.com/articles/apache-fcgid-acceptable-performance-and-better-resource-utilization.html
For fcgid reference for apache :
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
สมัครสมาชิก:
บทความ (Atom)