{"id":1346,"date":"2023-03-19T09:51:46","date_gmt":"2023-03-19T01:51:46","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1346"},"modified":"2023-04-29T09:04:49","modified_gmt":"2023-04-29T01:04:49","slug":"nginx-config-ssl-certificate-for-https-access","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/nginx-config-ssl-certificate-for-https-access\/","title":{"rendered":"Nginx\u914d\u7f6eSSL\u8bc1\u4e66\u5b9e\u73b0HTTPS\u8bbf\u95ee"},"content":{"rendered":"<p>\u7533\u8bf7\u7b2c\u4e09\u65b9\u6743\u5a01\u8ba4\u8bc1\u673a\u6784\uff08\u5982CA,Symantec,GeoTrust,CFCA\uff09\u7b7e\u53d1\u7684SSL\u6570\u5b57\u8bc1\u4e66\uff0c\u5b9e\u73b0\u7f51\u7ad9HTTPS\u8bbf\u95ee<\/p>\n<p><!-- more --><\/p>\n<p>\u8bc1\u4e66\u6587\u4ef6\uff1a<\/p>\n<pre><code>app.yezhou.cc.jks\napp.yezhou.cc.key\napp.yezhou.cc.pem\napp.yezhou.cc.pfx<\/code><\/pre>\n<p>\u865a\u62df\u4e3b\u673a\u914d\u7f6e\uff1a<\/p>\n<pre><code>server {\n    listen       80;\n    listen       443 ssl;\n    server_name  app.yezhou.cc;\n    index index.html index.htm index.php;\n    root \/data\/www\/app;\n    server_name_in_redirect off;\n\n    location ~ .+\\.php($|\/)\n    {\n        #fastcgi_pass  unix:\/tmp\/php-cgi.sock;\n        fastcgi_pass  127.0.0.1:9000;\n        fastcgi_index index.php;\n        include       fastcgi.conf;\n\n        fastcgi_split_path_info  ^(.+\\.php)(\/.*)$;\n        fastcgi_param  PATH_INFO $fastcgi_path_info;\n    }\n    location ~ .*\\.(gif|jpg|jpeg|png|bmp|swf)$\n    {\n        expires 30d;\n    }\n    location ~ .*\\.(js|css)?$\n    {\n        expires 1h;\n    }\n    #\u4f2a\u9759\u6001\u53ca\u65e5\u5fd7\n    #include \/data\/server\/nginx\/conf\/rewrite\/app.conf;\n    error_log \/data\/www\/logs\/app-error.log;\n    access_log \/data\/www\/logs\/app-access.log;\n\n    ssl on;\n    ssl_certificate \/data\/ssl\/app\/app.yezhou.cc.pem;\n    ssl_certificate_key \/data\/ssl\/app\/app.yezhou.cc.key;\n    ssl_session_timeout 5m;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7533\u8bf7\u7b2c\u4e09\u65b9\u6743\u5a01\u8ba4\u8bc1\u673a\u6784\uff08\u5982CA,Symantec,GeoTrust,CFCA\uff09\u7b7e\u53d1\u7684SSL\u6570\u5b57\u8bc1\u4e66\uff0c\u5b9e\u73b0\u7f51\u7ad9H [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332],"tags":[335],"class_list":["post-1346","post","type-post","status-publish","format-standard","hentry","category-nginx","tag-ssl"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1346"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1346\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}