{"id":32679,"date":"2023-04-16T06:57:52","date_gmt":"2022-12-16T20:47:29","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/"},"modified":"2024-01-15T07:26:10","modified_gmt":"2024-01-14T23:26:10","slug":"%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/","title":{"rendered":"\u5173\u4e8eSynology\u7684nginx"},"content":{"rendered":"<p>\u6211\u5bf9Synology\u7684Web\u670d\u52a1\u5668\u6709\u4e86\u4e00\u4e9b\u4e86\u89e3\u3002(\u6211\u5728DS220j\u4e0a\u8fdb\u884c\u4e86\u8c03\u67e5\u3002)<br \/>\n\u9ed8\u8ba4\u7684Web\u670d\u52a1\u5668\u662fnginx\u3002<\/p>\n<pre class=\"post-pre\"><code>$ nginx -V\r\nnginx version: nginx\/1.16.1\r\nTLS SNI support enabled\r\n<\/code><\/pre>\n<p>\u6839\u76ee\u5f55\u662f\/volume1\/web\u3002<br \/>\nNginx\u7684\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e\/etc\/nginx\u3002<\/p>\n<pre class=\"post-pre\"><code>$ ls \/etc\/nginx\r\napp.d         fastcgi_params  mime.types          proxy.conf     uwsgi_params\r\nconf.d        koi-utf         nginx.conf          scgi_params    win-utf\r\nfastcgi.conf  koi-win         nginx.conf.default  sites-enabled\r\n<\/code><\/pre>\n<p>\u91cd\u65b0\u542f\u52a8nginx\u7684\u65b9\u6cd5\u5982\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">sudo <\/span>synoservicecfg <span class=\"nt\">--restart<\/span> nginx\r\n<\/code><\/pre>\n<p>\u91cd\u65b0\u542f\u52a8\u540e\uff0c\/etc\/nginx\/nginx.conf \u5c06\u88ab\u8986\u76d6\u3002<\/p>\n<p>\u5728\u91cd\u65b0\u542f\u52a8\u65f6\uff0cnginx.conf \u5c06\u4ece\u4ee5\u4e0bmustache\u6587\u4ef6\u751f\u6210\u3002<\/p>\n<pre class=\"post-pre\"><code>$ ls \/usr\/syno\/share\/nginx\r\nAlias_v2.mustache           DSM.mustache          open_file_cache.mustache\r\navahi.mustache              error.html            optimization.mustache\r\ncgi.mustache                error_page.mustache   Portal.mustache\r\ncgi.pass.mustache           Firewall.mustache     server.mustache\r\nconf.d                      gzip.mustache         SSLProfile.mustache\r\ndeny.mustache               HSTS.mustache         SynoSharing.mustache\r\ndeny.PhotoStation.mustache  LetsEncrypt.mustache  WWW_Main.mustache\r\ndeny.synoman.mustache       logo.jpg              WWWService.mustache\r\nDSM_Main.mustache           nginx.mustache        X-Accel.mustache\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5bf9Synology\u7684Web\u670d\u52a1\u5668\u6709\u4e86\u4e00\u4e9b\u4e86\u89e3\u3002(\u6211\u5728DS220j\u4e0a\u8fdb\u884c\u4e86\u8c03\u67e5\u3002) \u9ed8\u8ba4\u7684Web\u670d\u52a1\u5668\u662fngi [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32679","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5173\u4e8eSynology\u7684nginx - Blog - Silicon Cloud<\/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:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8esynology\u7684nginx-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5173\u4e8eSynology\u7684nginx\" \/>\n<meta property=\"og:description\" content=\"\u6211\u5bf9Synology\u7684Web\u670d\u52a1\u5668\u6709\u4e86\u4e00\u4e9b\u4e86\u89e3\u3002(\u6211\u5728DS220j\u4e0a\u8fdb\u884c\u4e86\u8c03\u67e5\u3002) \u9ed8\u8ba4\u7684Web\u670d\u52a1\u5668\u662fngi [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8esynology\u7684nginx-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-16T20:47:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T23:26:10+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/\",\"name\":\"\u5173\u4e8eSynology\u7684nginx - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-16T20:47:29+00:00\",\"dateModified\":\"2024-01-14T23:26:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5173\u4e8eSynology\u7684nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5173\u4e8eSynology\u7684nginx - Blog - Silicon Cloud","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:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8esynology\u7684nginx-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5173\u4e8eSynology\u7684nginx","og_description":"\u6211\u5bf9Synology\u7684Web\u670d\u52a1\u5668\u6709\u4e86\u4e00\u4e9b\u4e86\u89e3\u3002(\u6211\u5728DS220j\u4e0a\u8fdb\u884c\u4e86\u8c03\u67e5\u3002) \u9ed8\u8ba4\u7684Web\u670d\u52a1\u5668\u662fngi [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8esynology\u7684nginx-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-16T20:47:29+00:00","article_modified_time":"2024-01-14T23:26:10+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/","name":"\u5173\u4e8eSynology\u7684nginx - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-16T20:47:29+00:00","dateModified":"2024-01-14T23:26:10+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5173\u4e8eSynology\u7684nginx"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8esynology%e7%9a%84nginx-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=32679"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32679\/revisions"}],"predecessor-version":[{"id":57353,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32679\/revisions\/57353"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=32679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=32679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=32679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}