แสดงบทความที่มีป้ายกำกับ nginx แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ nginx แสดงบทความทั้งหมด

วันพฤหัสบดีที่ 17 มกราคม พ.ศ. 2556

Tunning nginx worker process



From stackoverflow here : http://stackoverflow.com/questions/7325211/tuning-nginx-worker-process-to-obtain-100k-hits-per-min
worker_processes  4;  # 2*number of cpus
events {
    worker_connections  19000;  #it's the key to high performance - have a lot of coinnections available
}
worker_rlimit_nofile    20000;  #each connection needs a filehandle (or 2 if you are proxying)
keepalive_timeout  5;  #that' another key - close live connections as early as possible or disable them completely
#total amount of users you can serve in 1 second = worker_processes*worker_connections/keepalive_timeout

More info about nginx directive: http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/

วันอังคารที่ 11 กันยายน พ.ศ. 2555

[link] Nginx "how to" - Fast and Secure Web Server

I found useful link describe nginx configuration. For newbie, this could be a starting guide for nginx. There are examples config for various common nginx usage  : static files, ssl, reverse proxy. And some explanation of directives are also provided.

Let's have a look ! https://calomel.org/nginx.html

วันอังคารที่ 22 พฤษภาคม พ.ศ. 2555

Install nginx with php

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/

วันศุกร์ที่ 14 ตุลาคม พ.ศ. 2554

(link) Nginx "how to" - Fast and Secure webserver

This might be a informative link worth to visit if you are experiencing performance issue with web server. Nginx is an option.
https://calomel.org/nginx.html

วันพฤหัสบดีที่ 21 มกราคม พ.ศ. 2553

Nginx / lighttpd light weight web server.

Apache is a standard for web server. But, you can help apache and utilize computing resource by using lighttpd and nginx as a helper for static content/load balancer for your website.

nginx :
http://wiki.nginx.org/NginxModules
lighttpd
http://redmine.lighttpd.net/wiki/lighttpd