linux:nginx

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:nginx [2020/04/19 10:13] ともやんlinux:nginx [2023/09/12 10:55] (現在) – [Events モジュールの設定] ともやん
行 1: 行 1:
-<html> 
-  <style> 
-    #result pre, #mincode pre { 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #result_long pre { 
-      height: 400px; 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #logo { 
-      background-color: #222; 
-      width: fit-content; 
-      padding: 2px 10px; 
-    } 
-    #logo p { 
-      margin: 0; 
-    } 
-  </style> 
-</html> 
 ====== NGINX - ハイパフォーマンス ロードバランサー、Webサーバー、リバースプロキシ ====== ====== NGINX - ハイパフォーマンス ロードバランサー、Webサーバー、リバースプロキシ ======
 <WRAP #logo> <WRAP #logo>
行 136: 行 113:
 worker_cpu_affinity 0001 0010 0100 1000; # ワーカープロセスが使うCPUコア(4コア) worker_cpu_affinity 0001 0010 0100 1000; # ワーカープロセスが使うCPUコア(4コア)
 </code> </code>
 +</WRAP>
  
 ※**worker_cpu_affinity** はプロセッサの数に応じて変更する。\\ ※**worker_cpu_affinity** はプロセッサの数に応じて変更する。\\
行 153: 行 131:
     multi_accept off;        # リスニングソケットオープン時の相互排他制御     multi_accept off;        # リスニングソケットオープン時の相互排他制御
     worker_connections 1024; # ワーカープロセス同時接続数     worker_connections 1024; # ワーカープロセス同時接続数
-    use epoll;               # Linux 2.系で効率的なモデル+    use epoll;               # Linux 3.10 系で効率的なモデル
 } }
 </code> </code>
行 176: 行 154:
     #types_hash_max_size 2048;     #types_hash_max_size 2048;
     types_hash_max_size 4096;     types_hash_max_size 4096;
 +}
 +</code>
 +</WRAP>
 +
 +==== アップロードサイズ制限の変更 ====
 +ファイルのアップロード時に **413 Request Entity Too Large** が発生する場合は、デフォルト 1M の制限を変更する。\\
 +<WRAP prewrap 100% #mincode>
 +<code autoconf /etc/nginx/nginx.conf>
 +http {
 +    #client_max_body_size 1m; # default
 +    client_max_body_size 100m;
 } }
 </code> </code>
行 219: 行 208:
 /etc/nginx/mime.types に含まれる多数のタイプに対して 2048 では不十分のようである。\\ /etc/nginx/mime.types に含まれる多数のタイプに対して 2048 では不十分のようである。\\
 [[https://bugzilla.redhat.com/show_bug.cgi?id=1564878|1564878 – NGINX: could not build optimal types_hash, you should increase either types_hash_max_size]]\\ [[https://bugzilla.redhat.com/show_bug.cgi?id=1564878|1564878 – NGINX: could not build optimal types_hash, you should increase either types_hash_max_size]]\\
 +
 +===== 参考文献 =====
 +[[http://nginx.org/en/docs/http/ngx_http_core_module.html|Module ngx_http_core_module]]\\
 +[[https://www.nginx.com/resources/wiki/start/topics/tutorials/install/|Install | NGINX]]\\
 +[[http://shim0mura.hatenadiary.jp/entry/20120110/1326198429|入門! nginx - tumblr]]\\
 +[[https://blog.dksg.jp/2012/04/centosnginx-php-fpminstallwordpress.html|CentOSにNginx + php-fpmをInstall、設定してWordPressを動かす]]\\
  
  • linux/nginx.1587258806.txt.gz
  • 最終更新: 2020/04/19 10:13
  • by ともやん