{"id":15209,"date":"2024-01-09T14:23:48","date_gmt":"2024-01-09T06:23:48","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=15209"},"modified":"2024-01-09T14:23:48","modified_gmt":"2024-01-09T06:23:48","slug":"%e8%87%aa%e5%bb%ba%e8%8b%b9%e6%9e%9c%e7%ad%be%e5%90%8d%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%b1%e8%b4%a5%e6%80%8e%e4%b9%88%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/15209\/","title":{"rendered":"\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u5931\u8d25\u600e\u4e48\u5904\u7406"},"content":{"rendered":"

<\/figure>\n<\/p>\n

\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u662f\u6307\u5728\u672c\u5730\u642d\u5efa\u4e00\u4e2a\u82f9\u679c\u5f00\u53d1\u8005\u8d26\u53f7\u6240\u9700\u7684\u7b7e\u540d\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u901a\u8fc7\u8be5\u670d\u52a1\u5668\u6765\u7b7e\u540d\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u4fbf\u5728\u975e\u5f00\u53d1\u8005\u6a21\u5f0f\u4e0b\u5b89\u88c5\u5728iOS\u8bbe\u5907\u4e0a\u3002\u7136\u800c\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u5e76\u4e0d\u7b80\u5355\uff0c\u9700\u8981\u4e00\u4e9b\u4e13\u4e1a\u7684\u77e5\u8bc6\u548c\u7ecf\u9a8c\uff0c\u5426\u5219\u5f88\u5bb9\u6613\u5931\u8d25\u3002\u4e0b\u9762\u5c06\u4ecb\u7ecd\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

\u4e00\u3001\u539f\u7406<\/p>\n

\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u7684\u539f\u7406\u662f\u5728\u670d\u52a1\u5668\u7aef\u751f\u6210\u4e00\u4e2a\u8bc1\u4e66\uff0c\u5e76\u5c06\u8be5\u8bc1\u4e66\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7ed1\u5b9aios15\u7b7e\u540d\u540e\u663e\u793a\u672a\u7b7e\u540d<\/a>\u3002\u5f53\u7528\u6237\u5728iOS\u8bbe\u5907\u4e0a\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u8bbe\u5907\u4f1a\u5411\u82f9\u679c\u670d\u52a1\u5668\u8bf7\u6c42\u9a8c\u8bc1\u8bc1\u4e66\uff0c\u5982\u679c\u8bc1\u4e66\u6709\u6548\uff0c\u5219\u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u5b89\u88c5\u3002\u5982\u679c\u8bc1\u4e66\u65e0\u6548\uff0c\u5219\u63d0\u793a\u7528\u6237\u65e0\u6cd5\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

\u4e8c\u3001\u8be6\u7ec6\u6b65\u9aa4<\/p>\n

1.\u51c6\u5907\u5de5\u4f5c<\/p>\n

\u9996\u5148\uff0c\u9700\u8981\u8d2d\u4e70\u4e00\u4e2a\u57df\u540d\uff0c\u5e76\u5728\u57df\u540d\u670d\u52a1\u5546\u5904\u8fdb\u884c\u914d\u7f6e\uff0c\u5c06\u57df\u540d\u89e3\u6790\u5230\u81ea\u5df1\u7684\u670d\u52a1\u5668IP\u5730\u5740\u4e0a\u3002\u5176\u6b21\uff0c\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Nginx\u3001PHP\u548cMySQL\u7b49\u5fc5\u8981\u7684\u8f6f\u4ef6\u3002<\/p>\n

2.\u751f\u6210\u8bc1\u4e66<\/p>\n

\u4f7f\u7528openssl\u547d\u4ee4\u751f\u6210\u8bc1\u4e66\u3002\u9996\u5148\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5openssl\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u4e00\u4e2a\u79c1\u94a5\uff1a<\/p>\n

“`<\/p>\n

openssl genrsa -out server.key 2048<\/p>\n

“`<\/p>\n

\u63a5\u7740\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u4e00\u4e2a\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42\uff1a<\/p>\n

“`<\/p>\n

openssl req -new -key server.key -out server.csr<\/p>\n

“`<\/p>\n

\u7136\u540e\u5728\u82f9\u679c\u5f00\u53d1\u8005\u4e2d\u5fc3\u7533\u8bf7\u4e00\u4e2a\u8bc1\u4e66\uff0c\u5e76\u5c06\u751f\u6210\u7684\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42\u4e0a\u4f20\u5230\u82f9\u679c\u5f00\u53d1\u8005\u4e2d\u5fc3\u3002\u82f9\u679c\u5f00\u53d1\u8005\u4e2d\u5fc3\u4f1a\u751f\u6210\u4e00\u4e2a\u8bc1\u4e66\uff0c\u5e76\u5c06\u5176\u8fd4\u56de\u7ed9\u4f60\u3002<\/p>\n

3.\u5b89\u88c5\u8bc1\u4e66<\/p>\n

\u5c06\u82f9\u679c\u5f00\u53d1\u8005\u4e2d\u5fc3\u751f\u6210\u7684\u8bc1\u4e66\u5b89\u88c5\u5230\u670d\u52a1\u5668\u4e0a\u3002\u5c06\u8bc1\u4e66\u6587\u4ef6\u4e0b\u8f7d\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u8bc1\u4e66\u5b89\u88c5\u5230Nginx\u670d\u52a1\u5668\u4e2d\uff1a<\/p>\n

“`<\/p>\n

openssl x509 -in cert.pem -inform PEM -out cert.crt<\/p>\n

“`<\/p>\n

\u63a5\u7740\u5c06\u751f\u6210\u7684cert.crt\u6587\u4ef6\u653e\u5165Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\uff1a<\/p>\n

“`<\/p>\n

ssl_certificate \/path\/to\/cert.crt;<\/p>\n

ssl_certificate_key \/path\/to\/server.key;<\/p>\n

“`<\/p>\n

4.\u914d\u7f6eNginx<\/p>\n

\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n

“`<\/p>\n

server {<\/p>\n

listen 80;<\/p>\n

server_name example.com;<\/p>\n

return 301 https:\/\/$host$request_uri;<\/p>\n

}<\/p>\n

server {<\/p>\n

listen 443 ssl;<\/p>\n

server_name example.com;<\/p>\n

ssl_certificate \/path\/to\/cert.crt;<\/p>\n

ssl_certificate_key \/path\/to\/server.key;<\/p>\n

ssl_session_cache shared:\u82f9\u679c\u4e3a\u4ec0\u4e48\u8001\u6389\u7b7e\u540d<\/a>SSL:1m;<\/p>\n

ssl_session_timeout 5m;<\/p>\n

ssl_ciphers HIGH:!aNULL:!MD5;<\/p>\n

ssl_prefer_server_ciphers on;<\/p>\n

location \/ {<\/p>\n

proxy_pass http:\/\/127.0.0.1:8080;<\/p>\n

proxy_set_header Host $host;<\/p>\n

proxy_set_header X-Real-IP $remote_addr;<\/p>\n

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<\/p>\n

}<\/p>\n

}<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cexample.com\u4e3a\u4f60\u7684\u57df\u540d\uff0c8080\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u76d1\u542c\u7684\u7aef\u53e3\u3002<\/p>\n

5.\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5c06\u5e94\u7528\u7a0b\u5e8f\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u5e76\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u5e94\u7528\u7a0b\u5e8f\u5c06\u4f1a\u5728iOS\u8bbe\u5907\u4e0a\u5b89\u88c5\u6210\u529f\u3002<\/p>\n

\u4e09\u3001\u5931\u8d25\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6cd5<\/p>\n

\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u5931\u8d25\u7684\u539f\u56e0\u53ef\u80fd\u6709\u5f88\u591a\uff0c\u5e38\u89c1\u7684\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n

1.\u8bc1\u4e66\u65e0\u6548\u6216\u8fc7\u671f<\/p>\n

\u89e3\u51b3\u65b9\u6cd5\uff1a\u91cd\u65b0\u7533\u8bf7\u8bc1\u4e66\uff0c\u5e76\u5c06\u5176\u5b89\u88c5\u5230\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n

2.\u670d\u52a1\u5668\u914d\u7f6e\u9519\u8bef<\/p>\n

\u89e3\u51b3\u65b9\u6cd5\uff1a\u68c0\u67e5Nginx\u3001PHP\u548cMySQL\u7b49\u8f6f\u4ef6\u7684\u914d\u7f6e\u662f\u5426\u6b63\u786e\uff0c\u786e\u4fdd\u8f6f\u4ef6\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n

3.\u57df\u540d\u89e3\u6790\u9519\u8bef<\/p>\n

\u89e3\u51b3\u65b9\u6cd5\uff1a\u68c0\u67e5\u57df\u540d\u89e3\u6790\u662f\u5426\u6b63\u786e\uff0c\u786e\u4fdd\u57df\u540d\u5df2\u6b63\u786e\u89e3\u6790\u5230\u670d\u52a1\u5668IP\u5730\u5740\u4e0a\u3002<\/p>\n

4.\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u9519\u8bef<\/p>\n

\u89e3\u51b3\u65b9\u6cd5\uff1a\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u5df2\u6b63\u786e\u7b7e\u540d\uff0c\u7b7e\u540d\u8bc1\u4e66\u6709\u6548\u4e14\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7ed1\u5b9a\u3002<\/p>\n

\u603b\u4e4b\uff0c\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u9700\u8981\u638c\u63e1\u4e00\u5b9a\u7684\u6280\u672f\u548c\u7ecf\u9a8c\uff0c\u5982\u679c\u6ca1\u6709\u8db3\u591f\u7684\u77e5\u8bc6\u548c\u7ecf\u9a8c\uff0c\u5219\u5f88\u5bb9\u6613\u5931\u8d25\u3002\u56e0\u6b64\uff0c\u5728\u8fdb\u884c\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u8fdb\u884c\u5145\u5206\u7684\u5b66\u4e60\u548c\u51c6\u5907\u3002<\/p>\n

\u4e00\u95e8APP\u8bc1\u4e66\u5236\u4f5c\u5de5\u5177(https:\/\/platform.yimenapp.com\/)\u63d0\u4f9bAPP\u8bc1\u4e66\u5728\u7ebf\u5236\u4f5c\uff0c\u652f\u6301\u82f9\u679c\u8bc1\u4e66\u3001\u5b89\u5353\u8bc1\u4e66\u5728\u7ebf\u4e00\u952e\u5feb\u6377\u5236\u4f5c\u3002\u5de5\u5177\u5b8c\u5168\u514d\u8d39\uff0c\u6ce8\u518c\u6210\u4e3a\u4e00\u95e8APP\u5f00\u53d1\u8005\u5373\u53ef\u4f7f\u7528\uff0c\u5168\u4e2d\u6587\u5316\u4e91\u7aefAPP\u8bc1\u4e66\u5de5\u5177\u3002
\n\u4e00\u952e\u5236\u4f5cIOS\u82f9\u679c\u8bc1\u4e66\uff0c\u5305\u542bappstore\u4e0a\u67b6\u8bc1\u4e66\u3001\u5f00\u53d1\u73af\u5883\u6d4b\u8bd5\u8bc1\u4e66\u3001ADhoc\u751f\u4ea7\u73af\u5883\u6d4b\u8bd5\u8bc1\u4e66\u3001\u5728\u7ebf\u751f\u6210P12\u5f00\u53d1\u8005\u8bc1\u4e66\u8bc1\u4e66\uff0cP12\u63a8\u9001\u8bc1\u4e66\u3001P8\u63a8\u9001\u8bc1\u4e66\uff0c\u5feb\u6377\u7ed1\u5b9aUDID\u3001\u81ea\u5b9a\u4e49\u5305\u540dBundle ID\u3001\u5728\u7ebf\u83b7\u53d6\u63cf\u8ff0\u6587\u4ef6\uff1b
\n\u4e00\u952e\u5236\u4f5c\u5b89\u5353\u8bc1\u4e66\uff0c\u652f\u6301\u81ea\u5b9a\u4e49\u5b89\u5353\u5305\u540d\u3001\u7b7e\u540d\u6587\u4ef6\u5bc6\u7801(storepass)\u3001\u522b\u540d(alias)\u3001\u522b\u540d\u5bc6\u7801(keypass)\u3001\u516c\u53f8\/\u673a\u6784\u540d\u79f0 (O)\u3001\u90e8\u95e8 (OU)\u3001\u56fd\u5bb6\/\u5730\u533a (C)\u3001\u7701\u4efd (ST)\u3001\u57ce\u5e02 (L)\u3001\u90ae\u7bb1 (E)\u3001\u4ee5\u53ca\u5b89\u5353\u8bc1\u4e66\u6709\u6548\u671f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u81ea\u5efa\u82f9\u679c\u7b7e\u540d\u670d\u52a1\u5668\u662f\u6307\u5728\u672c\u5730\u642d\u5efa\u4e00\u4e2a\u82f9\u679c\u5f00\u53d1\u8005\u8d26\u53f7\u6240\u9700\u7684\u7b7e\u540d\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u901a\u8fc7\u8be5\u670d\u52a1\u5668\u6765\u7b7e\u540d\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u4fbf\u5728\u975e\u5f00\u53d1\u8005\u6a21\u5f0f\u4e0b\u5b89\u88c5\u5728iOS\u8bbe\u5907\u4e0a\u3002\u7136\u800c\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u5e76\u4e0d\u7b80\u5355\uff0c\u9700\u8981\u4e00\u4e9b\u4e13\u4e1a\u7684\u77e5\u8bc6\u548c\u7ecf\u9a8c\uff0c\u5426<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[19195,12,19,19194,30],"topic":[],"class_list":["post-15209","post","type-post","status-publish","format-standard","hentry","category-appzs","tag-appapp","tag-12","tag-19","tag-ipa","tag-30"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=15209"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15209\/revisions"}],"predecessor-version":[{"id":15230,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15209\/revisions\/15230"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=15209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=15209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=15209"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=15209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}