{"id":101167,"date":"2024-08-01T18:31:28","date_gmt":"2024-08-01T10:31:28","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=101167"},"modified":"2024-08-01T18:31:28","modified_gmt":"2024-08-01T10:31:28","slug":"nginx-optimization","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/nginx-optimization.html","title":{"rendered":"\u6700\u4f73 Nginx \u914d\u7f6e\u6587\u4ef6\u4f18\u5316\u65b9\u6848"},"content":{"rendered":"
<\/p>\n
\u4ee5\u4e0b\u662f\u751f\u4ea7\u73af\u5883\u4e2d\u9002\u7528\u7684Nginx\u4f18\u5316\u6587\u4ef6\uff0c\u4f60\u4e5f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8c03\u4f18\u3002<\/p>\n
\r\n user www www;\r\n #\u7528\u6237&\u7ec4\r\n worker_processes auto;\r\n #\u901a\u5e38\u662fCPU\u6838\u7684\u6570\u91cf\u5b58\u50a8\u6570\u636e\u7684\u786c\u76d8\u6570\u91cf\u53ca\u8d1f\u8f7d\u6a21\u5f0f,\u4e0d\u786e\u5b9a\u65f6\u5c06\u5176\u8bbe\u7f6e\u4e3a\u53ef\u7528\u7684CPU\u5185\u6838\u6570\uff08\u8bbe\u7f6e\u4e3a\u201cauto\u201d\u5c06\u5c1d\u8bd5\u81ea\u52a8\u68c0\u6d4b\u5b83\uff09\r\n error_log \/usr\/local\/nginx\/logs\/error.log crit;\r\n pid \/usr\/local\/nginx\/logs\/nginx.pid;\r\n #\u6307\u5b9apid\u6587\u4ef6\u7684\u4f4d\u7f6e,\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5\r\n\r\n worker_rlimit_nofile 65535;\r\n #\u66f4\u6539worker\u8fdb\u7a0b\u7684\u6700\u5927\u6253\u5f00\u6587\u4ef6\u6570\u9650\u5236\r\n events {\r\n use epoll;\r\n multi_accept on;\r\n #\u5728Nginx\u63a5\u5230\u4e00\u4e2a\u65b0\u8fde\u63a5\u901a\u77e5\u540e,\u8c03\u7528accept()\u6765\u63a5\u53d7\u5c3d\u91cf\u591a\u7684\u8fde\u63a5\r\n worker_connections 65535;\r\n #\u6700\u5927\u8bbf\u95ee\u5ba2\u6237\u6570,\u4fee\u6539\u6b64\u503c\u65f6,\u4e0d\u80fd\u8d85\u8fc7 worker_rlimit_nofile \u503c\r\n }\r\n http {\r\n include mime.types;\r\n default_type application\/octet-stream;\r\n #\u4f7f\u7528\u7684\u9ed8\u8ba4\u7684 MIME-type\r\n log_format '$remote_addr - $remote_user [$time_local] \"$request\" '\r\n '$status $body_bytes_sent \"$http_referer\" '\r\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';\r\n #\u5b9a\u4e49\u65e5\u5fd7\u683c\u5f0f\r\n charset UTF-8;\r\n #\u8bbe\u7f6e\u5934\u6587\u4ef6\u9ed8\u8ba4\u5b57\u7b26\u96c6\r\n server_tokens off;\r\n #Nginx\u6253\u5f00\u7f51\u9875\u62a5\u9519\u65f6,\u5173\u95ed\u7248\u672c\u53f7\u663e\u793a\r\n access_log off;\r\n sendfile on;\r\n tcp_nopush on;\r\n #\u544a\u8bc9nginx\u5728\u4e00\u4e2a\u6570\u636e\u5305\u91cc\u53d1\u9001\u6240\u6709\u5934\u6587\u4ef6,\u800c\u4e0d\u4e00\u4e2a\u63a5\u4e00\u4e2a\u7684\u53d1\u9001\r\n tcp_nodelay on;\r\n #\u662f\u5426\u542f\u7528 nagle \u7f13\u5b58\u7b97\u6cd5,\u544a\u8bc9nginx\u4e0d\u8981\u7f13\u5b58\u6570\u636e\r\n sendfile_max_chunk 512k;\r\n #\u6bcf\u4e2a\u8fdb\u7a0b\u6bcf\u6b21\u8c03\u7528\u4f20\u8f93\u6570\u91cf\u4e0d\u80fd\u5927\u4e8e\u8bbe\u5b9a\u7684\u503c,\u9ed8\u8ba4\u4e3a0,\u5373\u4e0d\u8bbe\u4e0a\u9650\r\n keepalive_timeout 65;\r\n #HTTP\u8fde\u63a5\u6301\u7eed\u65f6\u95f4,\u503c\u8d8a\u5927\u65e0\u7528\u7684\u7ebf\u7a0b\u53d8\u7684\u8d8a\u591a,0:\u5173\u95ed\u6b64\u529f\u80fd,\u9ed8\u8ba4\u4e3a75\r\n client_header_timeout 10;\r\n client_body_timeout 10;\r\n #\u4ee5\u4e0a\u4e24\u9879\u662f\u8bbe\u7f6e\u8bf7\u6c42\u5934\u548c\u8bf7\u6c42\u4f53\u5404\u81ea\u7684\u8d85\u65f6\u65f6\u95f4\r\n reset_timedout_connection on;\r\n #\u544a\u8bc9nginx\u5173\u95ed\u4e0d\u54cd\u5e94\u7684\u5ba2\u6237\u7aef\u8fde\u63a5\r\n send_timeout 30;\r\n #\u5ba2\u6237\u7aef\u54cd\u5e94\u8d85\u65f6\u65f6\u95f4,\u82e5\u5ba2\u6237\u7aef\u505c\u6b62\u8bfb\u53d6\u6570\u636e,\u91ca\u653e\u8fc7\u671f\u7684\u5ba2\u6237\u7aef\u8fde\u63a5,\u9ed8\u8ba460s\r\n limit_conn_zone $binary_remote_addr zone=addr:5m;\r\n #\u7528\u4e8e\u4fdd\u5b58\u5404\u79cdkey,\u5982:\u5f53\u524d\u8fde\u63a5\u6570\u7684\u5171\u4eab\u5185\u5b58\u7684\u53c2\u6570,5m\u662f5\u5146\u5b57\u8282,\u8fd9\u4e2a\u503c\u5e94\u8be5\u88ab\u8bbe\u7f6e\u7684\u8db3\u591f\u5927,\u4ee5\u5b58\u50a8\uff0832K*5\uff0932byte\u72b6\u6001\u6216\u8005\uff0816K*5\uff0964byte\u72b6\u6001\r\n limit_conn addr 100;\r\n #key\u6700\u5927\u8fde\u63a5\u6570,\u8fd9\u91cckey\u662faddr,\u6211\u8bbe\u7f6e\u7684\u503c\u662f100,\u8fd9\u6837\u5c31\u5141\u8bb8\u6bcf\u4e2aIP\u5730\u5740\u6700\u591a\u540c\u65f6\u6253\u5f00100\u4e2a\u8fde\u63a5\u6570\r\n server_names_hash_bucket_size 128;\r\n #nginx\u542f\u52a8\u51fa\u73b0could not build the server_names_hash, you should increase\u9519\u8bef\u65f6,\u8bf7\u63d0\u9ad8\u8fd9\u4e2a\u53c2\u6570\u7684\u503c\u4e00\u822c\u8bbe\u621064\u5c31\u591f\u4e86\r\n client_body_buffer_size 10K;\r\n client_header_buffer_size 32k;\r\n #\u5ba2\u6237\u7aef\u8bf7\u6c42\u5934\u90e8\u7684\u7f13\u51b2\u533a\u5927\u5c0f,\u8fd9\u4e2a\u53ef\u4ee5\u6839\u636e\u4f60\u7684\u7cfb\u7edf\u5206\u9875\u5927\u5c0f\u8fdb\u884c\u8bbe\u7f6e\r\n large_client_header_buffers 4 32k;\r\n client_max_body_size 8m;\r\n #\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u8bbe\u7f6e,\u4e00\u822c\u662f\u52a8\u6001\u5e94\u7528\u7c7b\u578b\r\n\r\n #\u7ebf\u7a0b\u6c60\u4f18\u5316,\u4f7f\u7528--with-threads\u914d\u7f6e\u53c2\u6570\u7f16\u8bd1\r\n #aio threads;\r\n #thread_pool default threads=32 max_queue=65536;\r\n #aio threads=default;\r\n #\u5173\u4e8e\u66f4\u591a\u7ebf\u7a0b\u8bf7\u70b9\u51fb\u67e5\u770b\r\n\r\n #fastcgi\u6027\u80fd\u8c03\u4f18\r\n\r\n fastcgi_connect_timeout 300;\r\n #\u8fde\u63a5\u5230\u540e\u7aef Fastcgi \u7684\u8d85\u65f6\u65f6\u95f4\r\n fastcgi_send_timeout 300;\r\n #\u4e0e Fastcgi \u5efa\u7acb\u8fde\u63a5\u540e\u591a\u4e45\u4e0d\u4f20\u9001\u6570\u636e,\u5c31\u4f1a\u88ab\u81ea\u52a8\u65ad\u5f00\r\n fastcgi_read_timeout 300;\r\n #\u63a5\u6536 Fastcgi \u5e94\u7b54\u8d85\u65f6\u65f6\u95f4\r\n fastcgi_buffers 4 64k;\r\n #\u53ef\u4ee5\u8bbe\u7f6e\u4e3a FastCGI \u8fd4\u56de\u7684\u5927\u90e8\u5206\u5e94\u7b54\u5927\u5c0f,\u8fd9\u6837\u53ef\u4ee5\u5904\u7406\u5927\u90e8\u5206\u8bf7\u6c42,\u8f83\u5927\u7684\u8bf7\u6c42\u5c06\u88ab\u7f13\u51b2\u5230\u78c1\u76d8\r\n fastcgi_buffer_size 64k;\r\n #\u6307\u5b9a\u8bfb\u53d6 Fastcgi \u5e94\u7b54\u7b2c\u4e00\u90e8\u5206\u9700\u8981\u591a\u5927\u7684\u7f13\u51b2\u533a,\u53ef\u4ee5\u8bbe\u7f6egastcgi_buffers\u9009\u9879\u6307\u5b9a\u7684\u7f13\u51b2\u533a\u5927\u5c0f\r\n fastcgi_busy_buffers_size 128k;\r\n #\u7e41\u5fd9\u65f6\u7684buffer,\u53ef\u4ee5\u662ffastcgi_buffer\u7684\u4e24\u500d\r\n fastcgi_temp_file_write_size 128k;\r\n #\u5728\u5199\u5165fastcgi_temp_path\u65f6\u5c06\u7528\u591a\u5927\u7684\u6570\u636e\u5757,\u9ed8\u8ba4\u503c\u662ffastcgi_buffers\u7684\u4e24\u500d,\u8be5\u503c\u8d8a\u5c0f\u8d8a\u53ef\u80fd\u62a5 502 BadGateway\r\n fastcgi_intercept_errors on;\r\n #\u662f\u5426\u4f20\u90124**&5**\u9519\u8bef\u4fe1\u606f\u5230\u5ba2\u6237\u7aef,\u6216\u5141\u8bb8nginx\u4f7f\u7528error_page\u5904\u7406\u9519\u8bef\u4fe1\u606f.\r\n\r\n #fastcgi_cache\u914d\u7f6e\u4f18\u5316(\u82e5\u662f\u591a\u7ad9\u70b9\u865a\u62df\u4e3b\u673a,\u9664fastcgi_cache_path(\u6ce8\u610fkeys_zone=\u540d\u79f0)\u5168\u90e8\u52a0\u5165php\u6a21\u5757\u4e2d)\r\n\r\n fastcgi_cache fastcgi_cache;\r\n #\u5f00\u542fFastCGI\u7f13\u5b58\u5e76\u6307\u5b9a\u4e00\u4e2a\u540d\u79f0,\u5f00\u542f\u7f13\u5b58\u53ef\u4ee5\u964d\u4f4eCPU\u7684\u8d1f\u8f7d,\u9632\u6b62502\u9519\u8bef\u51fa\u73b0\r\n fastcgi_cache_valid 200 302 301 1h;\r\n #\u5b9a\u4e49\u54ea\u4e9bhttp\u5934\u8981\u7f13\u5b58\r\n fastcgi_cache_min_uses 1;\r\n #URL\u7ecf\u8fc7\u591a\u5c11\u6b21\u8bf7\u6c42\u5c06\u88ab\u7f13\u5b58\r\n fastcgi_cache_use_stale error timeout invalid_header http_500;\r\n #\u5b9a\u4e49\u54ea\u4e9b\u60c5\u51b5\u4e0b\u7528\u8fc7\u671f\u7f13\u5b58\r\n #fastcgi_temp_path \/usr\/local\/nginx\/fastcgi_temp;\r\n fastcgi_cache_path \/usr\/local\/nginx\/fastcgi_cache levels=1:2 keys_zone=fastcgi_cache:15m inactive=1d max_size=1g;\r\n #keys_zone=\u7f13\u5b58\u7a7a\u95f4\u7684\u540d\u5b57,cache=\u7528\u591a\u5c11\u5185\u5b58,inactive=\u9ed8\u8ba4\u5931\u6548\u65f6\u95f4,max_size=\u6700\u591a\u7528\u591a\u5c11\u786c\u76d8\u7a7a\u95f4\u3002\r\n #\u7f13\u5b58\u76ee\u5f55,\u53ef\u4ee5\u8bbe\u7f6e\u76ee\u5f55\u5c42\u7ea7,\u4e3e\u4f8b:1:2\u4f1a\u751f\u621016*256\u4e2a\u5b57\u76ee\u5f55\r\n fastcgi_cache_key $scheme$request_method$host$request_uri;\r\n #\u5b9a\u4e49fastcgi_cache\u7684key\r\n #fastcgi_ignore_headers Cache-Control Expires Set-Cookie;\r\n\r\n #\u54cd\u5e94\u5934\r\n\r\n add_header X-Cache $upstream_cache_status;\r\n #\u7f13\u5b58\u547d\u4e2d\r\n add_header X-Frame-Options SAMEORIGIN;\r\n #\u662f\u4e3a\u4e86\u51cf\u5c11\u70b9\u51fb\u52ab\u6301\uff08Clickjacking\uff09\u800c\u5f15\u5165\u7684\u4e00\u4e2a\u54cd\u5e94\u5934\r\n add_header X-Content-Type-Options nosniff;\r\n\r\n #GZIP\u6027\u80fd\u4f18\u5316\r\n\r\n gzip on;\r\n gzip_min_length 1100;\r\n #\u5bf9\u6570\u636e\u542f\u7528\u538b\u7f29\u7684\u6700\u5c11\u5b57\u8282\u6570,\u5982:\u8bf7\u6c42\u5c0f\u4e8e1K\u6587\u4ef6,\u4e0d\u8981\u538b\u7f29,\u538b\u7f29\u5c0f\u6570\u636e\u4f1a\u964d\u4f4e\u5904\u7406\u6b64\u8bf7\u6c42\u7684\u6240\u6709\u8fdb\u7a0b\u901f\u5ea6\r\n gzip_buffers 4 16k;\r\n gzip_proxied any;\r\n #\u5141\u8bb8\u6216\u8005\u7981\u6b62\u538b\u7f29\u57fa\u4e8e\u8bf7\u6c42\u548c\u54cd\u5e94\u7684\u54cd\u5e94\u6d41,\u82e5\u8bbe\u7f6e\u4e3aany,\u5c06\u4f1a\u538b\u7f29\u6240\u6709\u8bf7\u6c42\r\n gzip_http_version 1.0;\r\n gzip_comp_level 9;\r\n #gzip\u538b\u7f29\u7b49\u7ea7\u57280-9\u5185,\u6570\u503c\u8d8a\u5927\u538b\u7f29\u7387\u8d8a\u9ad8,CPU\u6d88\u8017\u4e5f\u5c31\u8d8a\u5927\r\n gzip_types text\/plain text\/css application\/javascript application\/x-javascript text\/xml application\/xml application\/xml+rss text\/javascript application\/json image\/jpeg image\/gif image\/png;\r\n #\u538b\u7f29\u7c7b\u578b\r\n gzip_vary on;\r\n #varyheader\u652f\u6301,\u8ba9\u524d\u7aef\u7684\u7f13\u5b58\u670d\u52a1\u5668\u8bc6\u522b\u538b\u7f29\u540e\u7684\u6587\u4ef6,\u4ee3\u7406\r\n include \/usr\/local\/nginx\/conf\/vhosts\/*.conf;\r\n #\u5728\u5f53\u524d\u6587\u4ef6\u4e2d\u5305\u542b\u53e6\u4e00\u4e2a\u6587\u4ef6\u5185\u5bb9\u7684\u6307\u4ee4\r\n\r\n #\u9759\u6001\u6587\u4ef6\u7684\u7f13\u5b58\u6027\u80fd\u8c03\u4f18\r\n\r\n open_file_cache max=65535 inactive=20s;\r\n #\u8fd9\u4e2a\u5c06\u4e3a\u6253\u5f00\u6587\u4ef6\u6307\u5b9a\u7f13\u5b58,max \u6307\u5b9a\u7f13\u5b58\u6570\u91cf.\u5efa\u8bae\u548c\u6253\u5f00\u6587\u4ef6\u6570\u4e00\u81f4.inactive \u662f\u6307\u7ecf\u8fc7\u591a\u957f\u65f6\u95f4\u6587\u4ef6\u6ca1\u88ab\u8bf7\u6c42\u540e\u5220\u9664\u7f13\u5b58\r\n open_file_cache_valid 30s;\r\n #\u8fd9\u4e2a\u662f\u6307\u591a\u957f\u65f6\u95f4\u68c0\u67e5\u4e00\u6b21\u7f13\u5b58\u7684\u6709\u6548\u4fe1\u606f,\u4f8b\u5982\u6211\u4e00\u76f4\u8bbf\u95ee\u8fd9\u4e2a\u6587\u4ef6,30\u79d2\u540e\u68c0\u67e5\u662f\u5426\u66f4\u65b0,\u53cd\u4e4b\u66f4\u65b0\r\n open_file_cache_min_uses 2;\r\n #\u5b9a\u4e49\u4e86open_file_cache\u4e2d\u6307\u4ee4\u53c2\u6570\u4e0d\u6d3b\u52a8\u65f6\u95f4\u671f\u95f4\u91cc\u6700\u5c0f\u7684\u6587\u4ef6\u6570\r\n open_file_cache_errors on;\r\n #NGINX\u53ef\u4ee5\u7f13\u5b58\u5728\u6587\u4ef6\u8bbf\u95ee\u671f\u95f4\u53d1\u751f\u7684\u9519\u8bef,\u8fd9\u9700\u8981\u8bbe\u7f6e\u8be5\u503c\u624d\u80fd\u6709\u6548,\u5982\u679c\u542f\u7528\u9519\u8bef\u7f13\u5b58.\u5219\u5728\u8bbf\u95ee\u8d44\u6e90\uff08\u4e0d\u67e5\u627e\u8d44\u6e90\uff09\u65f6.NGINX\u4f1a\u62a5\u544a\u76f8\u540c\u7684\u9519\u8bef\r\n\r\n #\u8d44\u6e90\u7f13\u5b58\u4f18\u5316\r\n server {\r\n\r\n #\u9632\u76d7\u94fe\u8bbe\u7f6e\r\n\r\n location ~* \\.(jpg|gif|png|swf|flv|wma|asf|mp3|mmf|zip|rar)$ {\r\n #\u9632\u76d7\u7c7b\u578b\r\n valid_referers none blocked *.renwole.com renwole.com;\r\n #none blocked\u53c2\u6570\u53ef\u9009.\u5141\u8bb8\u4f7f\u7528\u8d44\u6e90\u6587\u4ef6\u7684\u57df\u540d\r\n if ($invalid_referer) {\r\n return 403;\r\n #rewrite ^\/ https:\/\/renwole.com\r\n #\u82e5\u4e0d\u7b26\u5408\u6761\u4ef6\u57df\u540d,\u5219\u8fd4\u56de403\u6216404\u4e5f\u53ef\u4ee5\u662f\u57df\u540d\r\n }\r\n }\r\n location ~ .*\\.(js|css)$ {\r\n access_log off;\r\n expires 180d;\r\n #\u5065\u5eb7\u68c0\u67e5\u6216\u56fe\u7247.JS.CSS\u65e5\u5fd7.\u4e0d\u9700\u8981\u8bb0\u5f55\u65e5\u5fd7.\u5728\u7edf\u8ba1PV\u65f6\u662f\u6309\u7167\u9875\u9762\u8ba1\u7b97.\u800c\u4e14\u5199\u5165\u9891\u7e41\u4f1a\u6d88\u8017IO.\r\n }\r\n location ~* ^.+\\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|swf|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {\r\n access_log off;\r\n log_not_found off;\r\n expires 180d;\r\n #\u89c6\u56fe&\u5143\u7d20\u5f88\u5c11\u6539\u53d8.\u53ef\u5c06\u5185\u5bb9\u7f13\u5b58\u5230\u7528\u6237\u672c\u5730.\u518d\u6b21\u8bbf\u95ee\u7f51\u7ad9\u65f6\u5c31\u65e0\u9700\u4e0b\u8f7d.\u8282\u7701\u6d41\u91cf.\u52a0\u5feb\u8bbf\u95ee\u901f\u5ea6.\u7f13\u5b58180\u5929\r\n }\r\n }\r\n server {\r\n listen 80 default_server;\r\n server_name .renwole.com;\r\n rewrite ^ https:\/\/renwole.com$request_uri?;\r\n }\r\n server {\r\n listen 443 ssl http2 default_server;\r\n listen [::]:443 ssl http2;\r\n server_name .renwole.com;\r\n root \/home\/web\/renwole;\r\n index index.html index.php;\r\n\r\n ssl_certificate \/etc\/letsencrypt\/live\/renwole.com\/fullchain.pem;\r\n ssl_certificate_key \/etc\/letsencrypt\/live\/renwole.com\/privkey.pem;\r\n\r\n ssl_dhparam \/etc\/nginx\/ssl\/dhparam.pem;\r\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;\r\n ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';\r\n\r\n ssl_session_cache shared:SSL:50m;\r\n ssl_session_timeout 1d;\r\n ssl_session_tickets off;\r\n ssl_prefer_server_ciphers on;\r\n add_header Strict-Transport-Security max-age=15768000;\r\n ssl_stapling on;\r\n ssl_stapling_verify on;\r\n\r\n include \/usr\/local\/nginx\/conf\/rewrite\/wordpress.conf;\r\n access_log \/usr\/local\/nginx\/logs\/renwole.log;\r\n\r\n location ~ \\.php$ {\r\n root \/home\/web\/renwole;\r\n #fastcgi_pass 127.0.0.1:9000;\r\n fastcgi_pass unix:\/var\/run\/www\/php-cgi.sock;\r\n fastcgi_index index.php;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n include fastcgi_params;\r\n }\r\n }\r\n }\r\n<\/pre>\n\u4ee5\u4e0a\u5c31\u662f\u672c\u7ad9\u6240\u4f7f\u7528\u7684\u73af\u5883\u4f18\u5316\u60c5\u51b5\uff0c\u5982\u4f60\u6709\u66f4\u597d\u7684\u65b9\u6848\u4e0d\u59a8\u5206\u4eab\u51fa\u6765\u3002\u5982\u6709\u4ec0\u4e48\u6709\u4e0d\u8db3\u4e4b\u5904\uff0c\u8fd8\u8bf7\u8c05\u89e3\u3002<\/p>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/renwole.com\/archives\/387<\/a><\/p>\n