{"id":1287,"date":"2020-02-19T14:02:05","date_gmt":"2020-02-19T06:02:05","guid":{"rendered":"https:\/\/www.wurend.com\/?p=1287"},"modified":"2020-02-19T14:02:06","modified_gmt":"2020-02-19T06:02:06","slug":"%e5%88%a9%e7%94%a8nginx%e5%8f%8d%e4%bb%a3%e7%bb%99plex%e9%83%a8%e7%bd%b2%e8%af%81%e4%b9%a6","status":"publish","type":"post","link":"https:\/\/www.wurend.com\/?p=1287","title":{"rendered":"\u5229\u7528Nginx\u53cd\u4ee3\u7ed9Plex\u90e8\u7f72\u8bc1\u4e66"},"content":{"rendered":"\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><h2 id=\"h2-0\">\u4ecb\u7ecd<\/h2><\/div><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u4e0d\u60f3\u770b\u5e9f\u8bdd\u7684\u53ef\u4ee5\u76f4\u63a5\u4ece\u6b65\u9aa4\u5f00\u59cb\u770b\u3002<\/p><\/blockquote>\n\n\n\n<p class=\"is-style-text-indent-2em\">\u5982\u4eca\u4f7f\u7528nas\u7684\u7528\u6237\u662f\u8d8a\u6765\u8d8a\u591a\uff0cnas\u9664\u4e86\u7528\u6765\u505a\u6587\u4ef6\u50a8\u5b58\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u5c06\u4e4b\u5f53\u4f5c\u4e00\u53f0\u4e2a\u4eba\u5bb6\u7528\u670d\u52a1\u5668\u4f7f\u7528\uff0c\u7528\u6765\u4f5c\u4e3a\u4e00\u4e2a\u79c1\u4eba\u7684\u89c6\u9891\u50a8\u5b58\u5e93\u7684\u7528\u6237\u4e5f\u4e0d\u518d\u5c11\u6570\uff0c\u73b0\u5728\u5e02\u9762\u4e0a\u4f7f\u7528\u8f83\u5e38\u89c1\u7684\u4e3a <em>emby<\/em> \u3001 <em>plex<\/em>\u3001 <em>Jellyfin<\/em> \uff0c\u5305\u62ecnas\u7cfb\u7edf\u81ea\u5e26\u7684\uff08\u5982\u7fa4\u6656\u7cfb\u7edf\uff09\u7b49\u4e0d\u5c11\u9009\u62e9\u3002<\/p>\n\n\n\n<p class=\"is-style-text-indent-2em\">\u5bf9\u4e8e\u642d\u5efa\u5982\u4eca\u7f51\u4e0a\u90fd\u6709\u5f88\u591a\u6559\u7a0b\uff0c\u5305\u62ec\u5982\u4f55\u5b9e\u73b0\u5728\u516c\u7f51\u4e0a\u8bbf\u95ee\u7684\u6559\u7a0b\u4e5f\u662f\u6781\u591a\uff0c\u4f46\u73b0\u5728https\u662f\u8d8a\u6765\u8d8a\u666e\u53ca\uff0c\u5982\u4f55\u7ed9\u5176\u6dfb\u52a0\u4e00\u8bc1\u4e66\u8fdb\u884chttps\u8fdb\u884c\u52a0\u5bc6\u8bbf\u95ee\u6211\u89c9\u5f97\u8fd8\u662f\u5f88\u6709\u5fc5\u8981\u7684\u3002<\/p>\n\n\n\n<p class=\"is-style-text-indent-2em\">\u4ee5\u6211\u76ee\u524d\u4f7f\u7528\u7684plex\u4e3a\u4f8b\uff0c\u867d\u7136\u5728\u540e\u53f0\u8bbe\u7f6e\u91cc\u6709\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u4f46\u662f\u5bf9\u4e8e\u6211\u8fd9\u4e2a\u975e\u4e13\u4e1a\u4eba\u58eb\u6765\u8bf4\uff0c\u8fd8\u662f\u6709\u4e9b\u641e\u4e0d\u660e\u767d\uff0c\u540e\u6765\u5728\u67e5\u8be2\u89e3\u51b3\u529e\u6cd5\u7684\u65f6\u5019\u770b\u5230\u4e00\u7bc7\u540d\u4e3a<strong><em>\u201c<a href=\"https:\/\/yangmaopubu.com\/187.html\">Plex\u548cCloudFlare\u7ed3\u5408\u901f\u5ea6\u7ffb\u500d CDN\u52a0\u901fPlex<\/a>\u201d<\/em><\/strong>\u6587\u7ae0\uff0c\u7ec8\u662f\u627e\u5230\u5229\u7528nginx\u53cd\u4ee3\u7ed9plex\u90e8\u7f72\u8bc1\u4e66\u7684\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><h2 id=\"h2-1\">\u6b65\u9aa4<\/h2><\/div><\/div>\n\n\n\n<p class=\"is-style-text-indent-2em\"><strong>\u5728\u5f00\u59cb\u4e4b\u524d\u9996\u5148\u9700\u8981\u6709\u6548\u7684ssl\u8bc1\u4e66\u6587\u4ef6\u548c\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u597dnginx<\/strong><\/p>\n\n\n\n<p class=\"is-style-text-indent-2em\">\uff08\u5173\u4e8enginx\u7684\u5b89\u88c5\u8bf7\u81ea\u884c\u67e5\u627e\u6559\u7a0b\u8fdb\u884c\u90e8\u7f72\uff0c\u6211\u4f7f\u7528\u7684\u662f\u7f51\u7ad9\u73af\u5883\u642d\u5efa\u7684lnmp\u4e00\u952e\u811a\u672c\uff0cnginx\u7684\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\u4f1a\u548c\u72ec\u7acb\u5b89\u88c5\u7684nginx\u6587\u4ef6\u76ee\u5f55\u4e0d\u540c\uff01\uff01\uff01\uff09<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-2\"> \u670d\u52a1\u5668\u7aef\u8bbe\u7f6e<\/h3><\/div><\/div>\n\n\n\n<p>\u4e0b\u8f7d\u914d\u7f6enginx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/nginx\/conf\/vhost\nwget -O plex.conf https:\/\/raw.githubusercontent.com\/toomuchio\/plex-nginx-reverseproxy\/master\/nginx.conf<\/code><\/pre>\n\n\n\n<p> \u4fee\u6539\u4e0b\u8f7d\u7684Nginx\u914d\u7f6e\u6587\u4ef6 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim plex.conf<\/code><\/pre>\n\n\n\n<p>\u627e\u5230 server_name \u5e76\u7528\u81ea\u5df1\u8981\u7ed1\u5b9a\u7684\u57df\u540d\u66ff\u6362 \uff08\u9ed8\u8ba4http\u7aef\u53e3\u4e3a80\uff0chttps\u7aef\u53e3\u4e3a443\uff0c\u7531\u4e8e\u5bb6\u7528\u5e26\u5bbd\u7981\u7528\u4e8680\uff0c443\uff0c8080\u7aef\u53e3\uff0c\u8bf7\u81ea\u884c\u66f4\u6539\u672a\u5360\u7528\u7684\u7aef\u53e3\uff0c\u8bbf\u95ee\u65f6\u5728\u57df\u540d\u540e\u9762\u589e\u52a0\u7aef\u53e3\u53f7\u5373\u53ef\uff09<\/p>\n\n\n\n<p>\u7136\u540e\u627e\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssl_certificate\n\nssl_certificate_key\n\nssl_trusted_certificate #\u5982\u6ca1\u6709\u53ef\u5c06\u8be5\u6bb5\u5220\u9664\n\nssl_dhparam<\/code><\/pre>\n\n\n\n<p> \u5728\u6b64\u5904\u66ff\u6362\u4e3a\u7533\u8bf7\u7684letsencrypt\u8bc1\u4e66\uff1a <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssl_certificate \/etc\/nginx\/ssl\/{YOUR HOSTNAME}\/fullchain.pem;\nssl_certificate_key \/usr\/local\/nginx\/conf\/ssl\/{YOUR HOSTNAME}\/key.pem;\nssl_trusted_certificate \/\/usr\/local\/nginx\/conf\/ssl\/{YOUR HOSTNAME}\/chain.pem;   #\u5982\u6ca1\u6709\u53ef\u5c06\u8be5\u5927\u6bb5\u5220\u9664\nssl_dhparam \/usr\/local\/nginx\/conf\/ssl\/dhparam.pem;<\/code><\/pre>\n\n\n\n<p> \u7f16\u8f91\u597d\u540e\u4fdd\u5b58\u9000\u51fa\uff0c\u5e76\u91cd\u542fnginx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lnmp nginx restart<\/code><\/pre>\n\n\n\n<p> \u73b0\u5728Plex\u5e94\u8be5\u53ef\u4ee5\u901a\u8fc7https\u5f00\u5934\u7684\u57df\u540d\u8bbf\u95ee\u4e86<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-3\">Plex\u8bbe\u7f6e<\/h3><\/div><\/div>\n\n\n\n<p>\u66f4\u6539Plex\u670d\u52a1\u5668\u8bbe\u7f6e<\/p>\n\n\n\n<p>\u786e\u4fdd\u201c\u663e\u793a\u9ad8\u7ea7\u8bbe\u7f6e\u201d\u5df2\u542f\u7528\u3002\u5728\u201c\u7f51\u7edc\u201d\u9009\u9879\u5361\u4e0b\uff0c\u6dfb\u52a0\u81ea\u5b9a\u4e49\u8bbf\u95eeURL\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:\/\/xxx.xxx.com:xx,https:xxx.xxx.com:xx<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u4fbf\u53ef\u4ee5\u5728\u8def\u7531\u5668\u4e0a\u505a\u597d\u7aef\u53e3\u8f6c\u53d1\uff0c\u5c3d\u60c5\u5728\u516c\u7f51\u91cc\u8bbf\u95ee\u4e86~<\/p>\n\n\n\n<p style=\"font-size:1px\" class=\"has-text-align-center\"><span style=\"color:#cf2e2e\" class=\"color\">\u6ce8\uff1a\u5982\u6709\u8fde\u63a5\u4e0d\u901a\u7684\u60c5\u51b5\u8bf7\u68c0\u67e5\u81ea\u5df1\u670d\u52a1\u7684\u9632\u706b\u5899\u5bf9\u4e8e\u6240\u4f7f\u7528\u7684\u7aef\u53e3\u662f\u5426\u653e\u884c\uff01<\/span><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u60f3\u770b\u5e9f\u8bdd\u7684\u53ef\u4ee5\u76f4\u63a5\u4ece\u6b65\u9aa4\u5f00\u59cb\u770b\u3002 \u5982\u4eca\u4f7f\u7528nas\u7684\u7528\u6237\u662f\u8d8a\u6765\u8d8a\u591a\uff0cnas\u9664\u4e86\u7528\u6765\u505a\u6587\u4ef6\u50a8\u5b58\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u5c06\u4e4b\u5f53 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1289,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[3,88],"class_list":["post-1287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-4","tag-linux","tag-plex"],"_links":{"self":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts\/1287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1287"}],"version-history":[{"count":1,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts\/1287\/revisions"}],"predecessor-version":[{"id":1740,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts\/1287\/revisions\/1740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/media\/1289"}],"wp:attachment":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}