{"id":33148,"date":"2023-09-24T13:11:00","date_gmt":"2022-12-08T09:06:34","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/"},"modified":"2024-01-15T07:40:16","modified_gmt":"2024-01-14T23:40:16","slug":"%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/","title":{"rendered":"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX"},"content":{"rendered":"<p>\u542c\u8bf4\u901a\u8fc7homebrew\/tap\u5b89\u88c5nginx\uff0c\u5c31\u53ef\u4ee5\u5b89\u88c5ngx_small_light\u63d2\u4ef6\uff0c\u6240\u4ee5\u6211\u8bd5\u4e86\u4e00\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> brew tap homebrew\/nginx\r\n<span class=\"gp\">$<\/span>brew info nginx-full | <span class=\"nb\">grep <\/span>small-light\r\n<span class=\"go\">--with-small-light-module\r\n<\/span><span class=\"gp\">$<\/span>\r\n<\/code><\/pre>\n<p>\u7531\u4e8e\u5728nginx-full\u4e2d\u6dfb\u52a0\u4e86&#8211;with-small-light-module\u9009\u9879\uff0c\u56e0\u6b64\u4f7f\u7528\u6b64\u9009\u9879\u4f3c\u4e4e\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> brew <span class=\"nb\">install <\/span>nginx-full <span class=\"nt\">--with-small-light-module<\/span>\r\n<span class=\"gp\">==&gt;<\/span> Installing nginx-full from homebrew\/homebrew-nginx\r\n<span class=\"gp\">==&gt;<\/span> Installing nginx-full dependency: small-light-nginx-module\r\n<span class=\"gp\">==&gt;<\/span> Downloading https:\/\/github.com\/cubicdaiya\/ngx_small_light\/archive\/v0.6.6.tar.gz\r\n<span class=\"go\">Already downloaded: \/Library\/Caches\/Homebrew\/small-light-nginx-module-0.6.6.tar.gz\r\n\ufffd  \/usr\/local\/Cellar\/small-light-nginx-module\/0.6.6: 33 files, 232K, built in 2 seconds\r\n<\/span><span class=\"gp\">==&gt;<\/span> Installing nginx-full\r\n<span class=\"gp\">==&gt;<\/span> Downloading http:\/\/nginx.org\/download\/nginx-1.6.2.tar.gz\r\n<span class=\"gp\">#<\/span><span class=\"c\">####################################################################### 100.0%<\/span>\r\n<span class=\"gp\">==&gt;<\/span> .\/setup\r\n<span class=\"gp\">==&gt;<\/span> .\/configure <span class=\"nt\">--prefix<\/span><span class=\"o\">=<\/span>\/usr\/local\/Cellar\/nginx-full\/1.6.2 <span class=\"nt\">--with-http_ssl_module<\/span> <span class=\"nt\">--with-pcre<\/span> <span class=\"nt\">--with-ipv6<\/span> <span class=\"nt\">--sbin-path<\/span><span class=\"o\">=<\/span>\/usr\/local\/Cellar\/nginx-full\/1.6.2\/bi\r\n<span class=\"gp\">==&gt;<\/span> make\r\n<span class=\"gp\">==&gt;<\/span> make <span class=\"nb\">install<\/span>\r\n<span class=\"gp\">==&gt;<\/span> Caveats\r\n<span class=\"go\">Docroot is: \/usr\/local\/var\/www\r\n\r\nThe default port has been set in \/usr\/local\/etc\/nginx\/nginx.conf to 8080 so that\r\nnginx can run without sudo.\r\n\r\n- Tips -\r\nRun port 80:\r\n<\/span><span class=\"gp\"> $<\/span> <span class=\"nb\">sudo chown <\/span>root:wheel \/usr\/local\/Cellar\/nginx-full\/1.6.2\/sbin\/nginx\r\n<span class=\"gp\"> $<\/span> <span class=\"nb\">sudo chmod <\/span>u+s \/usr\/local\/Cellar\/nginx-full\/1.6.2\/sbin\/nginx\r\n<span class=\"go\">Reload config:\r\n<\/span><span class=\"gp\"> $<\/span> nginx <span class=\"nt\">-s<\/span> reload\r\n<span class=\"go\">Reopen Logfile:\r\n<\/span><span class=\"gp\"> $<\/span> nginx <span class=\"nt\">-s<\/span> reopen\r\n<span class=\"go\">Stop process:\r\n<\/span><span class=\"gp\"> $<\/span> nginx <span class=\"nt\">-s<\/span> stop\r\n<span class=\"go\">Waiting on exit process\r\n<\/span><span class=\"gp\"> $<\/span> nginx <span class=\"nt\">-s<\/span> quit\r\n<span class=\"go\">\r\nTo have launchd start nginx-full at login:\r\n    ln -sfv \/usr\/local\/opt\/nginx-full\/*.plist ~\/Library\/LaunchAgents\r\nThen to load nginx-full now:\r\n    launchctl load ~\/Library\/LaunchAgents\/homebrew.mxcl.nginx-full.plist\r\n<\/span><span class=\"gp\">==&gt;<\/span> Summary\r\n<span class=\"go\">\ufffd  \/usr\/local\/Cellar\/nginx-full\/1.6.2: 7 files, 940K, built in 20 seconds\r\n<\/span><span class=\"gp\">$<\/span> \/usr\/local\/bin\/nginx <span class=\"nt\">-V<\/span>\r\n<span class=\"go\">nginx version: nginx\/1.6.2\r\nbuilt by clang 6.0 (clang-600.0.57) (based on LLVM 3.5svn)\r\nTLS SNI support enabled\r\nconfigure arguments: --prefix=\/usr\/local\/Cellar\/nginx-full\/1.6.2 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=\/usr\/local\/Cellar\/nginx-full\/1.6.2\/bin\/nginx --with-cc-opt='-I\/usr\/local\/include -I\/usr\/local\/opt\/pcre\/include -I\/usr\/local\/opt\/openssl\/include' --with-ld-opt='-L\/usr\/local\/lib -L\/usr\/local\/opt\/pcre\/lib -L\/usr\/local\/opt\/openssl\/lib' --conf-path=\/usr\/local\/etc\/nginx\/nginx.conf --pid-path=\/usr\/local\/var\/run\/nginx.pid --lock-path=\/usr\/local\/var\/run\/nginx.lock --http-client-body-temp-path=\/usr\/local\/var\/run\/nginx\/client_body_temp --http-proxy-temp-path=\/usr\/local\/var\/run\/nginx\/proxy_temp --http-fastcgi-temp-path=\/usr\/local\/var\/run\/nginx\/fastcgi_temp --http-uwsgi-temp-path=\/usr\/local\/var\/run\/nginx\/uwsgi_temp --http-scgi-temp-path=\/usr\/local\/var\/run\/nginx\/scgi_temp --http-log-path=\/usr\/local\/var\/log\/nginx\/access.log --error-log-path=\/usr\/local\/var\/log\/nginx\/error.log --add-module=\/usr\/local\/share\/small-light-nginx-module\r\n<\/span><\/code><\/pre>\n<p>\u6211\u4eec\u7684ngx_small_light\u6a21\u5757\u5df2\u7ecf\u6b63\u786e\u6dfb\u52a0\u4e86\u3002\u975e\u5e38\u611f\u8c22@Tei1988\u7528\u6237\u63d0\u4f9b\u7684PR\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u542c\u8bf4\u901a\u8fc7homebrew\/tap\u5b89\u88c5nginx\uff0c\u5c31\u53ef\u4ee5\u5b89\u88c5ngx_small_light\u63d2\u4ef6\uff0c\u6240\u4ee5\u6211\u8bd5\u4e86\u4e00\u4e0b\u3002 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33148","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>\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX - 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\/\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236nginx\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX\" \/>\n<meta property=\"og:description\" content=\"\u542c\u8bf4\u901a\u8fc7homebrew\/tap\u5b89\u88c5nginx\uff0c\u5c31\u53ef\u4ee5\u5b89\u88c5ngx_small_light\u63d2\u4ef6\uff0c\u6240\u4ee5\u6211\u8bd5\u4e86\u4e00\u4e0b\u3002 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236nginx\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-08T09:06:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T23:40:16+00:00\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \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%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/\",\"name\":\"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-08T09:06:34+00:00\",\"dateModified\":\"2024-01-14T23:40:16+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX\"}]},{\"@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\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX - 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\/\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236nginx\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX","og_description":"\u542c\u8bf4\u901a\u8fc7homebrew\/tap\u5b89\u88c5nginx\uff0c\u5c31\u53ef\u4ee5\u5b89\u88c5ngx_small_light\u63d2\u4ef6\uff0c\u6240\u4ee5\u6211\u8bd5\u4e86\u4e00\u4e0b\u3002 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236nginx\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-08T09:06:34+00:00","article_modified_time":"2024-01-14T23:40:16+00:00","author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/","name":"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-08T09:06:34+00:00","dateModified":"2024-01-14T23:40:16+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5b89\u88c5\u4e86\u6346\u7ed1\u4e86ngx_small_light\u7684\u81ea\u5236NGINX"}]},{"@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\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ae%89%e8%a3%85%e4%ba%86%e6%8d%86%e7%bb%91%e4%ba%86ngx_small_light%e7%9a%84%e8%87%aa%e5%88%b6nginx%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33148","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\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=33148"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33148\/revisions"}],"predecessor-version":[{"id":57449,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33148\/revisions\/57449"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=33148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=33148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=33148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}