Outils pour utilisateurs

Outils du site


informatique:nginx

Ceci est une ancienne révision du document !


Table des matières

NGINX

Serveur HTTP.

Documentation

Tips & Tricks

http://articles.slicehost.com/2008/5/15/ubuntu-hardy-nginx-configuration/

user www-data www-data;
# Nginx can have more than one worker process running at the same time.
# To take advantage of SMP and to enable good efficiency I would recommend changing this to read:
worker_processes  4;
events {
    worker_connections  1024;
}
http {
    tcp_nodelay        on;
	include /usr/local/nginx/sites-enabled/*;
}

Sets the number of connections that each worker can handle. This is a good default setting.

You can work out the maximum clients value from this and the worker_processes settings:

max_clients = worker_processes * worker_connections

Sendfile is used when the server (Nginx) can actually ignore the contents of the file it is sending. It uses the kernel sendfile support instead of using it's own resources on the request.

It is generally used for larger files (such as images) which do not need use of a multiple request/confirmation system to be served - thus freeing resources for items that do need that level of 'supervision' from Nginx.

Keep it an on unless you know why you need to turn it off.

informatique/nginx.1283309148.txt.gz · Dernière modification : 19/05/2012 00:15 (modification externe)

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki