{"id":433,"date":"2025-03-01T12:18:00","date_gmt":"2025-03-01T04:18:00","guid":{"rendered":"https:\/\/blog.laning.org\/?p=433"},"modified":"2025-03-29T17:18:31","modified_gmt":"2025-03-29T09:18:31","slug":"emby%e5%8f%8d%e4%bb%a3%e5%8f%8ahttps%e9%85%8d%e7%bd%ae%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/","title":{"rendered":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Nginx\u914d\u7f6e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n\u00a0 listen 443 ssl;\n\u00a0 server_name your.domain.com;\n\u00a0 # Security \/ XSS Mitigation Headers\n\u00a0 add_header X-Frame-Options \"SAMEORIGIN\";\n\u00a0 add_header X-XSS-Protection \"1; mode=block\";\n\u00a0 add_header X-Content-Type-Options \"nosniff\";\n\u200b\n\u00a0 # ssl\u7684\u8bbe\u7f6e\n\u00a0 ssl_certificate \/etc\/nginx\/ssl\/cert.pem;\n\u00a0 ssl_certificate_key \/etc\/nginx\/ssl\/key.pem;\n\u00a0 ssl_session_timeout 5m;\n\u200b\n\u200b\n\u00a0 # \u7981\u6b62ip\u8bbf\u95ee\n\u00a0 if ($host ~ ^\\d+\\.\\d+\\.\\d+\\.\\d+$) {\n\u00a0 \u00a0 \u00a0 return 404;\n\u00a0 }\n\u200b\n\u00a0 # \u9632\u6b62\u722c\u866b\u83b7\u53d6header\uff0c\u76f4\u63a5\u8bbf\u95ee\/\u5c31\u8fd4\u56de502\uff0c\u5176\u4ed6\u7684\u8def\u5f84\u624d\u884c\uff0capp\u89c2\u770b\u4e0d\u5f71\u54cd\uff0c\u4e0d\u7528\u8fd9\u4e2a\n\u00a0 location = \/ {\n\u00a0 \u00a0 \u00a0 return 502;\n\u00a0 }\n\u200b\n\u00a0 location \/ {\n\u00a0 \u00a0 resolver 1.1.1.1 ipv6=off;\n\u00a0 \u00a0 \u00a0 if ($host != $server_name) {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return 403;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_pass https:\/\/www.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 # ssl pass\u76f8\u5173\u7684\u8bbe\u7f6e\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_ssl_name www.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_ssl_server_name on;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header Host www.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 set $magpiecdn \"$scheme:\/\/$server_name:$server_port\";\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header X-Real-IP $remote_addr;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header X-Forwarded-Proto $scheme;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header X-Forwarded-Protocol $scheme;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header X-Forwarded-Host $http_host;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header MagpieCDN $magpiecdn;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_buffering off;\n\u00a0 }\n\u200b\n\u00a0 location \/***cdn {\n\u00a0 \u00a0 \u00a0 \u00a0 resolver 1.1.1.1 ipv6=off;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_pass https:\/\/$arg_load.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 # ssl pass\u76f8\u5173\u7684\u8bbe\u7f6e\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_ssl_name $arg_load.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_ssl_server_name on;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_set_header Host $arg_load.emby.com;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_buffering on;\n\u00a0 \u00a0 \u00a0 \u00a0 proxy_max_temp_file_size 50m;\n\u00a0 \u00a0 }\n}<\/code><\/pre>\n\n\n\n<p><strong>\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<p>\u6ce8\u610f\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u57df\u540d\u548c\u8981\u53cd\u4ee3\u7684\u670d\u52a1\u5668\u57df\u540d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5229\u7528acme\u7533\u8bf7\u57df\u540d\u8bc1\u4e66<\/h2>\n\n\n\n<ol>\n<li>\u5728\u7ebf\u5b89\u88c5<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/get.acme.sh | sh -s email=my@example.com<\/code><\/pre>\n\n\n\n<ol start=\"2\">\n<li>\u914d\u7f6e\u8bc1\u4e66<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>export CF_Token=\u201c\u201d #\u9700\u8981DNS\u8bfb\u53d6\u7f16\u8f91\u6743\u9650<br>\u200b<br>export CF_Zone_ID=\"\"<br>\u200b<br>acme.sh --issue --dns dns_cf -d your.domain.com<br>\u200b<br>acme.sh --install-cert -d your.domain.com \\<br>--key-file &nbsp; &nbsp; &nbsp; \/etc\/nginx\/ssl\/key.pem \\<br>--fullchain-file \/etc\/nginx\/ssl\/cert.pem \\<br>--reloadcmd &nbsp; &nbsp; \"service nginx reload\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Nginx\u914d\u7f6e \u8bf4\u660e\uff1a \u6ce8\u610f\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u57df\u540d\u548c\u8981\u53cd\u4ee3\u7684\u670d\u52a1\u5668\u57df\u540d \u5229\u7528acme\u7533\u8bf7\u57df\u540d\u8bc1\u4e66<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b &ndash; Laning &#039;s Blog<\/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:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b &ndash; Laning &#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Nginx\u914d\u7f6e \u8bf4\u660e\uff1a \u6ce8\u610f\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u57df\u540d\u548c\u8981\u53cd\u4ee3\u7684\u670d\u52a1\u5668\u57df\u540d \u5229\u7528acme\u7533\u8bf7\u57df\u540d\u8bc1\u4e66\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/\" \/>\n<meta property=\"og:site_name\" content=\"Laning &#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-01T04:18:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-29T09:18:31+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"laning\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.laning.org\/#website\",\"url\":\"https:\/\/blog.laning.org\/\",\"name\":\"\\u8fa3\\u5b81\\u7684\\u535a\\u5ba2\",\"description\":\"Learning on the go\",\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.laning.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage\",\"url\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/\",\"name\":\"Emby\\u53cd\\u4ee3\\u53caHTTPS\\u914d\\u7f6e\\u6559\\u7a0b &ndash; Laning &#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/#website\"},\"datePublished\":\"2025-03-01T04:18:00+00:00\",\"dateModified\":\"2025-03-29T09:18:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"https:\/\/blog.laning.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Emby\\u53cd\\u4ee3\\u53caHTTPS\\u914d\\u7f6e\\u6559\\u7a0b\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage\"},\"author\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"headline\":\"Emby\\u53cd\\u4ee3\\u53caHTTPS\\u914d\\u7f6e\\u6559\\u7a0b\",\"datePublished\":\"2025-03-01T04:18:00+00:00\",\"dateModified\":\"2025-03-29T09:18:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage\"},\"wordCount\":4,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\",\"name\":\"laning\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.laning.org\/#personlogo\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"caption\":\"laning\"},\"logo\":{\"@id\":\"https:\/\/blog.laning.org\/#personlogo\"},\"sameAs\":[\"https:\/\/blog.laning.org\"],\"url\":\"https:\/\/blog.laning.org\/index.php\/author\/laning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b &ndash; Laning &#039;s Blog","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:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/","og_locale":"zh_CN","og_type":"article","og_title":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b &ndash; Laning &#039;s Blog","og_description":"Nginx\u914d\u7f6e \u8bf4\u660e\uff1a \u6ce8\u610f\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u57df\u540d\u548c\u8981\u53cd\u4ee3\u7684\u670d\u52a1\u5668\u57df\u540d \u5229\u7528acme\u7533\u8bf7\u57df\u540d\u8bc1\u4e66","og_url":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/","og_site_name":"Laning &#039;s Blog","article_published_time":"2025-03-01T04:18:00+00:00","article_modified_time":"2025-03-29T09:18:31+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"laning","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/blog.laning.org\/#website","url":"https:\/\/blog.laning.org\/","name":"\u8fa3\u5b81\u7684\u535a\u5ba2","description":"Learning on the go","publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.laning.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"WebPage","@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage","url":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/","name":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b &ndash; Laning &#039;s Blog","isPartOf":{"@id":"https:\/\/blog.laning.org\/#website"},"datePublished":"2025-03-01T04:18:00+00:00","dateModified":"2025-03-29T09:18:31+00:00","breadcrumb":{"@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/blog.laning.org\/"},{"@type":"ListItem","position":2,"name":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b"}]},{"@type":"Article","@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#article","isPartOf":{"@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage"},"author":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"headline":"Emby\u53cd\u4ee3\u53caHTTPS\u914d\u7f6e\u6559\u7a0b","datePublished":"2025-03-01T04:18:00+00:00","dateModified":"2025-03-29T09:18:31+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#webpage"},"wordCount":4,"commentCount":0,"publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"articleSection":["Linux"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.laning.org\/index.php\/2025\/03\/01\/433\/#respond"]}]},{"@type":["Person","Organization"],"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93","name":"laning","image":{"@type":"ImageObject","@id":"https:\/\/blog.laning.org\/#personlogo","inLanguage":"zh-CN","url":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","caption":"laning"},"logo":{"@id":"https:\/\/blog.laning.org\/#personlogo"},"sameAs":["https:\/\/blog.laning.org"],"url":"https:\/\/blog.laning.org\/index.php\/author\/laning\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/433"}],"collection":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/comments?post=433"}],"version-history":[{"count":3,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/433\/revisions"}],"predecessor-version":[{"id":438,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/433\/revisions\/438"}],"wp:attachment":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/media?parent=433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/categories?post=433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/tags?post=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}