• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Study2study#4 nginx conf_1_24
 

Study2study#4 nginx conf_1_24

on

  • 2,604 views

 

Statistics

Views

Total Views
2,604
Views on SlideShare
1,370
Embed Views
1,234

Actions

Likes
2
Downloads
4
Comments
0

3 Embeds 1,234

http://www.sssg.org 1189
http://feeds.feedburner.com 33
http://webcache.googleusercontent.com 12

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Study2study#4 nginx conf_1_24 Study2study#4 nginx conf_1_24 Presentation Transcript

  • study2study #4-Nginx - @n0ts Naoya NAKAZAWA 11/11/2011
  • who?• @n0ts• Naoya NAKAZAWA• • 22.5 /
  • nginx.confhttp://wiki.nginx.org/ NginxFullExample line 1-24
  • line 1user www www;
  • user www www; line 1 : nobody nobody rootsetuid()/setguid()
  • line 2worker_processes 5;
  • line 2worker_processes 5; : wroker_processes < > :1CPU nginxCPU
  • worker_processes 5; cont ; - SMP - I/O - select()/poll() 1 events
  • line 3error_log logs/error.log;
  • error_log logs/error.log; line 3 : error_log < > [ debug | info | notice | warn | error | crit ] : ${prefix}/logs/error.log (fastcgi ) - main : error - HTTP : crit - server : critVirtualHost
  • line 4pid logs/nginx.pid;
  • pid logs/nginx.pid; line 4 : pid < >PID HUP # kill -HUP `cat logs/nginx.pid`
  • line 5worker_rlimit_nofile 8192;
  • worker_rlimit_nofile 8192; line 5 : worker_rlimit_nofile < > : OS
  • line 7events {
  • events { line 7EventsNginxaccept_mutex, accept_mutex_delay,debug_connection, devpoll_changes, devpoll_events,kqueue_changes, kqueue_events, epoll_events,multi_accept, rtsig_signo, rtsig_overflow_events,rtsig_overflow_test, rtsig_overflow_threshold, use,worker_connections
  • line 8worker_connections 4096;
  • worker_connections 4096; line 8 : worker_connections < > : ?max_clients = worker_processes * worker_connectionsmax_clients = worker_processes * worker_connectins / 4
  • line 9}
  • } line 9
  • line 11http {
  • http { line 11HTTPNginx HTTP64
  • line 12include conf/mime.types;
  • include conf/mime.types; line 12 : include < > :v0.4.4 include vhosts/*.conf;
  • line 13include /etc/nginx/proxy.conf;
  • include /etc/nginx/proxy.conf; line 13
  • line 14include /etc/nginx/fastcgi.conf
  • include /etc/nginx/fastcgi.conf line 14
  • line 15index index.html index.htm index.php;
  • line 15index index.html index.htm index.php; : index < > : index.html
  • line 17default type application/octet-stream;
  • line 17default type application/octet-stream; : default_type <MIME > text/plain MIME MIME
  • line 18-20log_format main $remote_addr - $remote_user [$time_local] $status "$request" $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for";
  • log_format main line 18-20 $remote_addr - $remote_user [$time_local] $status "$request" $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"; : log_format < >< > : log_format combined “...”%b Apache mod_log_configcombinedlog_format combined ‘$remote_addr - $remote_user [$time_local] ‘ ‘“$request” $status $body_bytes_sent ‘ ‘“$http_referer” “$http_user_agent”’;
  • line 21access_log logs/access.log main;
  • access_log logs/access.log main; line 21: access_log < > [< >[ = ]] | off : log/access.log combined
  • line 22sendfile on;
  • linesendfile on; 22 : sendfile [on | off] : sendfile offsendfile()
  • line 23tcp_nopush on;
  • tcp_nopush on; line 23 : tcp_nopush [on | off] : off FreeBSDTCP_NOPUSH Linux TCP_CORK sendfile
  • line 24server_name_hash_bucket_size 128;
  • server_name_hash_bucket_size 128; line 24 : server_names_hash_bucket_size > : 32/64/128 CPU
  • Thanks!