0
11   11   11
11   11   11
11   11   11
11   11   11
11   11   11
11   11   11
11   11   11
11   11   11
./configure --without-http_charset_module                       --without-http_ssi_module                       --without-...
user     www www;          error_log     logs/error.log;          pid           /var/run/nginx.pid;          worker_rlimit...
http {               include                 mime.types;               default_type            text/html;               se...
#snip: log format definitions          server {               listen 80;               server_name _;               access...
set $agent "pc";                 if ($http_user_agent ~ ^DoCoMo/[0-9].[0-9][ /]) {                     set $agent "mobile"...
location ^~ /maintenance/ {                   root /home/tagomoris/for-sorry-blog/resources/pcsp/;                   if ($...
11   11   11
11   11   11
11   11   11
Upcoming SlideShare
Loading in...5
×

livedoor blogのsorryサーバの話 #study2study

3,858

Published on

Webサーバ勉強会 #4

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,858
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "livedoor blogのsorryサーバの話 #study2study"

  1. 1. 11 11 11
  2. 2. 11 11 11
  3. 3. 11 11 11
  4. 4. 11 11 11
  5. 5. 11 11 11
  6. 6. 11 11 11
  7. 7. 11 11 11
  8. 8. 11 11 11
  9. 9. ./configure --without-http_charset_module --without-http_ssi_module --without-http_autoindex_module --without-http_geo_module --without-http_map_module --without-http_fastcgi_module --without-http_memcached_module --without-http_browser_module --without-http_upstream_ip_hash_module --without-http_userid_module --without-http_empty_gif_module --without-http_scgi_module --without-http_uwsgi_module --with-http_stub_status_module11 11 11
  10. 10. user www www; error_log logs/error.log; pid /var/run/nginx.pid; worker_rlimit_nofile 200000; worker_processes 2; events { use epoll; worker_connections 10000; # max_connections = # worker_processes * worker_connections / 4 (reverce proxy) }11 11 11
  11. 11. http { include mime.types; default_type text/html; sendfile on; tcp_nopush on; send_timeout 10; keepalive_timeout 5 3; keepalive_requests 10; output_buffers 1 64k; postpone_output 1460; client_header_timeout 5; client_body_timeout 5; client_body_temp_path /dev/shm/nginx/client_temp 1 1; client_max_body_size 1m; client_body_buffer_size 32k; client_header_buffer_size 2k; large_client_header_buffers 4 8k; proxy_temp_path /dev/shm/nginx/proxy_temp 1 1;11 11 11
  12. 12. #snip: log format definitions server { listen 80; server_name _; access_log logs/sorry.access_log main; location /___nginx_status { stub_status on; allow 10.0.0.0/8; allow 127.0.0.1; deny all; }11 11 11
  13. 13. set $agent "pc"; if ($http_user_agent ~ ^DoCoMo/[0-9].[0-9][ /]) { set $agent "mobile"; } if ($http_user_agent ~ ^SoftBank/[0-9].[0-9]) { set $agent "mobile"; } ### snip: various careers... if ($http_user_agent ~ ^ASTEL/) { set $agent "mobile"; }11 11 11
  14. 14. location ^~ /maintenance/ { root /home/tagomoris/for-sorry-blog/resources/pcsp/; if ($agent = mobile) { root /home/tagomoris/for-sorry-blog/resources/mobile/; } index /maintenance/maintenance.html; } location / { # redirect means 302 (temporarily moved) rewrite ^.*$ /maintenance/maintenance.html redirect; } } #server11 11 11
  15. 15. 11 11 11
  16. 16. 11 11 11
  17. 17. 11 11 11
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×