{"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\nssl_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":"\n
LNMP + https \u81ea\u52a8\u8df3\u8f6c<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n