{"id":496,"date":"2019-08-15T15:48:54","date_gmt":"2019-08-15T07:48:54","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=496"},"modified":"2021-04-02T16:55:26","modified_gmt":"2021-04-02T08:55:26","slug":"wgrbkjze","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/","title":{"rendered":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c)"},"content":{"rendered":"\n

\u4e00\u3001 <\/strong>NGINX<\/strong><\/a> \u914d\u7f6e\u3002<\/strong><\/p>\n\n\n

ssl \u52a0\u5bc6\u8bbe\u7f6e \u6dfb\u52a0\u5728 http{} \u4e2d<\/h1>\n\n\n
ssl_certificate \/etc\/nginx\/cert\/www.wangfeng.live.pem; #\u8bc1\u4e66.pem\nssl_certificate_key \/etc\/nginx\/cert\/www.wangfeng.live.key; #\u8bc1\u4e66.key\nssl_session_cache shared:SSL:1m; #\u8bbe\u7f6e\u50a8\u5b58SSL\u4f1a\u8bdd\u7684\u7f13\u5b58\u7c7b\u578b\u548c\u5927\u5c0f\u3002\nssl_session_timeout  10m; #\u8bbe\u7f6e\u5ba2\u6237\u7aef\u80fd\u591f\u53cd\u590d\u4f7f\u7528\u50a8\u5b58\u5728\u7f13\u5b58\u4e2d\u7684\u4f1a\u8bdd\u53c2\u6570\u65f6\u95f4\u3002\nssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;  #\u4f7f\u7528\u6b64\u52a0\u5bc6\u5957\u4ef6\u3002\nssl_protocols TLSv1 TLSv1.1 TLSv1.2;   #\u4f7f\u7528\u8be5\u534f\u8bae\u8fdb\u884c\u914d\u7f6e\u3002\nssl_prefer_server_ciphers on; #\u4f9d\u8d56SSLv3\u548cTLSv1\u534f\u8bae\u7684\u670d\u52a1\u5668\u5bc6\u7801\u5c06\u4f18\u5148\u4e8e\u5ba2\u6237\u7aef\u5bc6\u7801\u3002\nserver_tokens off; #\u9690\u85cf\u7248\u672c\u53f7<\/code><\/pre>\n\n\n

\u6dfb\u52a0\u652f\u6301PHP\u89e3\u6790\uff0c80\u7aef\u53e3\u81ea\u52a8\u8df3\u8f6c443<\/h1>\n\n\n
server {\n    listen 80;\n    server_name www.wangfeng.live;\n    rewrite ^(.*) https:\/\/$server_name$1 permanent; #\u8df3\u8f6c\u5230443\n}\nserver {\n    listen       443 ssl http2 default_server;\n    listen       [::]:443 ssl http2 default_server;\n    server_name  www.wangfeng.live;\n    root         \/var\/www\/wordpress;\nindex index.php index.html;\n\n    location \/ {\n    if (-f $request_filename\/index.html){\n        rewrite (.*) $1\/index.html break;\n    } \n\n    if (-f $request_filename\/index.php){\n     rewrite (.*) $1\/index.php;\n    }\n\n          if (!-f $request_filename){\n            rewrite (.*) \/index.php;\n    }\n    }\n\n    error_page 404 \/404.html;\n        location = \/40x.html {\n    }\n\n    error_page 500 502 503 504 \/50x.html;\n        location = \/50x.html {\n    }\n\nlocation ~ \\.php$ {\n    root \/var\/www\/wordpress;\n    fastcgi_pass   127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    include        fastcgi_params;\n    index index.html index.php index.htm;\n}\n}<\/code><\/pre>\n\n\n

\u4e8c\u3001php-fpm \u914d\u7f6e<\/strong><\/p>\n\n\n

\u4fee\u6539php-fpm \u8fd0\u884c\u7528\u6237\uff0c\u6700\u597d\u548cNGINX\u540c\u4e00\u4e2a\u7528\u6237\uff0c\u6743\u9650\u597d\u8c03\u6574\u3002<\/p>\n\n\n

vim  \/usr\/local\/php\/etc\/php-fpm.d\/www.conf<\/pre>\n\n\n
\"\"<\/figure>\n\n\n

\u4e09\u3001PHP \u914d\u7f6e<\/strong><\/p>\n\n\n

\u8c03\u6574PHP\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\uff0c\u9ed8\u8ba42M\uff0c\u4e00\u9996\u6b4c\u90fd\u4f20\u4e0d\u4e0a\u53bb\uff0c<\/p>\n\n\n

vim \/etc\/php.ini<\/p>\n\n\n

post_max_size = 50M<\/p>\n\n\n

\u56db\u3001\u914d\u7f6e\u963f\u91cc\u4e91\u7aef\u53e3\u5b89\u5168\u7b56\u7565<\/strong><\/p>\n\n\n

\u5f00\u653e\u7aef\u53e380,443 <\/p>\n\n\n
\u5141\u8bb8<\/td>\u81ea\u5b9a\u4e49 TCP<\/td>443\/443<\/td>IPv4\u5730\u5740\u6bb5\u8bbf\u95ee<\/td>0.0.0.0\/0<\/td>System created rule.<\/td>99<\/td>2019\u5e747\u670824\u65e5 16:29<\/td>\u4fee\u6539|\u514b\u9686|\u5220\u9664<\/td><\/tr><\/tbody><\/table>\n\n\n
\u5141\u8bb8<\/td>\u81ea\u5b9a\u4e49 TCP<\/td>80\/80<\/td>IPv4\u5730\u5740\u6bb5\u8bbf\u95ee<\/td>0.0.0.0\/0<\/td>System created rule.<\/td>99<\/td>2019\u5e747\u670817\u65e5 16:50<\/td>\u4fee\u6539|\u514b\u9686|\u5220\u9664<\/td><\/tr><\/tbody><\/table>\n","protected":false},"excerpt":{"rendered":"

\u4e00\u3001 NGINX \u914d\u7f6e\u3002 ssl \u52a0\u5bc6\u8bbe\u7f6e \u6dfb\u52a0\u5728 http{} \u4e2d \u6dfb\u52a0\u652f\u6301PHP\u89e3\u6790\uff0c80\u7aef\u53e3\u81ea\u52a8\u8df3\u8f6c44<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"yoast_head":"\nwordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001 NGINX \u914d\u7f6e\u3002 ssl \u52a0\u5bc6\u8bbe\u7f6e \u6dfb\u52a0\u5728 http{} \u4e2d \u6dfb\u52a0\u652f\u6301PHP\u89e3\u6790\uff0c80\u7aef\u53e3\u81ea\u52a8\u8df3\u8f6c44\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-15T07:48:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-02T08:55:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wangfeng.live\/wp-content\/uploads\/2019\/08\/image-2.png\" \/>\n<meta name=\"author\" content=\"\u7ba1\u7406\u5458\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c)\",\"datePublished\":\"2019-08-15T07:48:54+00:00\",\"dateModified\":\"2021-04-02T08:55:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\"},\"wordCount\":29,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\",\"name\":\"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2019-08-15T07:48:54+00:00\",\"dateModified\":\"2021-04-02T08:55:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\/\/www.linuxdevops.cn\/linux\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\",\"url\":\"https:\/\/www.linuxdevops.cn\/\",\"name\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"description\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0\",\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"alternateName\":\"linuxdevops\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxdevops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\",\"name\":\"\u7ba1\u7406\u5458\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"contentUrl\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u7ba1\u7406\u5458\"},\"logo\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\"},\"description\":\"\u7ba1\u7406\u5458\",\"url\":\"https:\/\/www.linuxdevops.cn\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/","og_locale":"zh_CN","og_type":"article","og_title":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","og_description":"\u4e00\u3001 NGINX \u914d\u7f6e\u3002 ssl \u52a0\u5bc6\u8bbe\u7f6e \u6dfb\u52a0\u5728 http{} \u4e2d \u6dfb\u52a0\u652f\u6301PHP\u89e3\u6790\uff0c80\u7aef\u53e3\u81ea\u52a8\u8df3\u8f6c44","og_url":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2019-08-15T07:48:54+00:00","article_modified_time":"2021-04-02T08:55:26+00:00","og_image":[{"url":"https:\/\/www.wangfeng.live\/wp-content\/uploads\/2019\/08\/image-2.png"}],"author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c)","datePublished":"2019-08-15T07:48:54+00:00","dateModified":"2021-04-02T08:55:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/"},"wordCount":29,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"articleSection":["Linux"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/","url":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/","name":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2019-08-15T07:48:54+00:00","dateModified":"2021-04-02T08:55:26+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/wgrbkjze\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux","item":"https:\/\/www.linuxdevops.cn\/linux\/"},{"@type":"ListItem","position":3,"name":"wordpress\u4e2a\u4eba\u535a\u5ba2\u5efa\u7ad9 (\u4e8c)"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxdevops.cn\/#website","url":"https:\/\/www.linuxdevops.cn\/","name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","description":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0","publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"alternateName":"linuxdevops","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxdevops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":["Person","Organization"],"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1","name":"\u7ba1\u7406\u5458","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","contentUrl":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","width":512,"height":512,"caption":"\u7ba1\u7406\u5458"},"logo":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/"},"description":"\u7ba1\u7406\u5458","url":"https:\/\/www.linuxdevops.cn\/author\/root\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/496"}],"collection":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":1002,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/496\/revisions\/1002"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}