自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Nginx配置文件基本應(yīng)用參考手冊(cè)

開(kāi)發(fā) 前端
Nginx配置文件需要程序員不斷的更新自己的知識(shí)庫(kù),在進(jìn)行文件配置的時(shí)候有很多知識(shí)需要掌握。下面就是一個(gè)典型的例子。

Nginx配置文件有很多需要我們注意很多問(wèn)題,其中在進(jìn)行user配置的時(shí)候就需要我們引起重視,我們?cè)诓粩嗟氖褂弥芯蜁?huì)發(fā)現(xiàn)這一點(diǎn),下面是一個(gè)簡(jiǎn)單的Nginx配置文件:

Nginx配置文件引用

  1. user www www;  
  2. worker_processes 8;  
  3. worker_cpu_affinity 00000001 00000010 00000100 00001000 
    00010000 00100000 01000000;  
  4. error_log /www/log/Nginx_error.log crit;  
  5. pid /usr/local/Nginx/Nginx.pid;  
  6. worker_rlimit_nofile 204800;  
  7. events  
  8. {  
  9. use epoll;  
  10. worker_connections 204800;  
  11. }  
  12. http  
  13. {  
  14. include mime.types;  
  15. default_type application/octet-stream;  
  16. charset utf-8;  
  17. server_names_hash_bucket_size 128;  
  18. client_header_buffer_size 2k;  
  19. large_client_header_buffers 4 4k;  
  20. client_max_body_size 8m;  
  21. sendfile on;  
  22. tcp_nopush on;  
  23. keepalive_timeout 60;  
  24. fastcgi_cache_path /usr/local/Nginx/fastcgi_cache levels=1:2  
  25. keys_zone=TEST:10m  
  26. inactive=5m;  
  27. fastcgi_connect_timeout 300;  
  28. fastcgi_send_timeout 300;  
  29. fastcgi_read_timeout 300;  
  30. fastcgi_buffer_size 4k;  
  31. fastcgi_buffers 8 4k;  
  32. fastcgi_busy_buffers_size 8k;  
  33. fastcgi_temp_file_write_size 8k;  
  34. fastcgi_cache TEST;  
  35. fastcgi_cache_valid 200 302 1h;  
  36. fastcgi_cache_valid 301 1d;   
  37. fastcgi_cache_valid any 1m;  
  38. fastcgi_cache_min_uses 1;  
  39. fastcgi_cache_use_stale error timeout invalid_header http_500;  
  40. open_file_cache max=204800 inactive=20s;  
  41. open_file_cache_min_uses 1;  
  42. open_file_cache_valid 30s;  
  43. tcp_nodelay on;  
  44. gzip on;  
  45. gzip_min_length 1k;  
  46. gzip_buffers 4 16k;  
  47. gzip_http_version 1.0;  
  48. gzip_comp_level 2;  
  49. gzip_types text/plain application/x-javascript text/css 
    application/xml;  
  50. gzip_vary on;  
  51. server  
  52. {  
  53. listen 8080;  
  54. server_name backup.aiju.com;  
  55. index index.php index.htm;  
  56. root /www/html/;  
  57. location /status  
  58. {  
  59. stub_status on;  
  60. }  
  61. location ~ .*\.(php|php5)?$  
  62. {  
  63. fastcgi_pass 127.0.0.1:9000;  
  64. fastcgi_index index.php;  
  65. include fcgi.conf;  
  66. }  
  67. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$  
  68. {  
  69. expires 30d;  
  70. }  
  71. log_format access '$remote_addr - $remote_user 
    [$time_local] "$request" '  
  72. '$status $body_bytes_sent "$http_referer" '  
  73. '"$http_user_agent" $http_x_forwarded_for';  
  74. access_log /www/log/access.log access;  
  75. }  

上面的代碼就是對(duì)Nginx配置文件簡(jiǎn)單問(wèn)題的詳細(xì)介紹。

【編輯推薦】

  1. Nginx優(yōu)化設(shè)置基本的TCP配置
  2. Nginx配置文件優(yōu)化中的比較
  3. Nginx設(shè)置404相關(guān)問(wèn)題代碼答疑
  4. Nginx 502錯(cuò)誤兩種解決方案介紹
  5. Nginx默認(rèn)虛擬主機(jī)如何在server中添加
責(zé)任編輯:張浩 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-07-04 14:00:11

QT QEvent 類(lèi)

2010-05-26 10:58:02

SVN管理

2010-09-28 10:44:30

HTML DOM參考手

2010-09-01 09:51:39

CSSHackfloat

2009-11-04 17:52:35

Oracle用戶(hù)管理

2013-12-12 16:10:21

Lua腳本語(yǔ)言

2010-08-11 09:32:30

Ubuntu快捷鍵

2010-03-03 16:08:26

Python取得文件列

2010-07-08 15:24:17

SNMP trap

2011-10-27 14:24:47

HTML 5

2010-03-03 13:32:08

Python壓縮文件

2010-03-25 18:31:03

Nginx配置文件

2014-06-09 10:36:00

2010-01-05 11:26:27

.net Framew

2010-03-03 16:40:55

Python HTTP

2010-02-25 10:52:29

WCF響應(yīng)服務(wù)

2010-02-26 13:40:28

WCF消息頭

2010-03-04 14:57:08

Python解密VBS

2010-02-02 14:45:35

C++ typeof

2020-04-09 13:23:29

Nginx配置文件模板
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)