{"id":480,"date":"2019-08-09T14:59:26","date_gmt":"2019-08-09T06:59:26","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=480"},"modified":"2021-10-11T10:50:11","modified_gmt":"2021-10-11T02:50:11","slug":"lhzdtz","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/","title":{"rendered":"LNMP + https \u81ea\u52a8\u8df3\u8f6c"},"content":{"rendered":"\n

#\u6dfb\u52a0\u652f\u6301PHP 80\u7aef\u53e3\u81ea\u52a8\u8df3\u8f6c443 <\/p>\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\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    listen       443 ssl http2 default_server;\n    listen       [::]:443 ssl http2 default_server;\n    server_name  www.wangfeng.live;\n    root         \/var\/www\/wordpress;\n   index 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","protected":false},"excerpt":{"rendered":"

Nginx +Https +PHP80\u81ea\u52a8\u8df3\u8f6c443 \u670d\u52a1\u914d\u7f6e<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18,16],"tags":[24,23,25],"yoast_head":"\nLNMP + https \u81ea\u52a8\u8df3\u8f6c<\/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\/lhzdtz\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LNMP + https \u81ea\u52a8\u8df3\u8f6c\" \/>\n<meta property=\"og:description\" content=\"Nginx +Https +PHP80\u81ea\u52a8\u8df3\u8f6c443 \u670d\u52a1\u914d\u7f6e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-09T06:59:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-11T02:50:11+00:00\" \/>\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\/lhzdtz\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"LNMP + https \u81ea\u52a8\u8df3\u8f6c\",\"datePublished\":\"2019-08-09T06:59:26+00:00\",\"dateModified\":\"2021-10-11T02:50:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\"},\"wordCount\":98,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"keywords\":[\"https\",\"ningx\",\"php-fpm\"],\"articleSection\":[\"Linux\",\"Linux\u670d\u52a1\",\"PHP+HTML\u524d\u7aef\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\",\"name\":\"LNMP + https \u81ea\u52a8\u8df3\u8f6c\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2019-08-09T06:59:26+00:00\",\"dateModified\":\"2021-10-11T02:50:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u670d\u52a1\",\"item\":\"https:\/\/www.linuxdevops.cn\/linuxservice\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LNMP + https \u81ea\u52a8\u8df3\u8f6c\"}]},{\"@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":"LNMP + https \u81ea\u52a8\u8df3\u8f6c","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\/lhzdtz\/","og_locale":"zh_CN","og_type":"article","og_title":"LNMP + https \u81ea\u52a8\u8df3\u8f6c","og_description":"Nginx +Https +PHP80\u81ea\u52a8\u8df3\u8f6c443 \u670d\u52a1\u914d\u7f6e","og_url":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2019-08-09T06:59:26+00:00","article_modified_time":"2021-10-11T02:50:11+00:00","author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"LNMP + https \u81ea\u52a8\u8df3\u8f6c","datePublished":"2019-08-09T06:59:26+00:00","dateModified":"2021-10-11T02:50:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/"},"wordCount":98,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"keywords":["https","ningx","php-fpm"],"articleSection":["Linux","Linux\u670d\u52a1","PHP+HTML\u524d\u7aef"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/","url":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/","name":"LNMP + https \u81ea\u52a8\u8df3\u8f6c","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2019-08-09T06:59:26+00:00","dateModified":"2021-10-11T02:50:11+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2019\/08\/lhzdtz\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux\u670d\u52a1","item":"https:\/\/www.linuxdevops.cn\/linuxservice\/"},{"@type":"ListItem","position":3,"name":"LNMP + https \u81ea\u52a8\u8df3\u8f6c"}]},{"@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\/480"}],"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=480"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"predecessor-version":[{"id":1107,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/480\/revisions\/1107"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}