{"id":32799,"date":"2023-12-26T19:13:13","date_gmt":"2023-03-11T22:03:11","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/"},"modified":"2024-05-04T15:31:18","modified_gmt":"2024-05-04T07:31:18","slug":"%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/","title":{"rendered":"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406"},"content":{"rendered":"<h3>\u73af\u5883\u4fe1\u606f<\/h3>\n<pre class=\"post-pre\"><code>[user@instance ~]# cat \/etc\/redhat-release\r\nRed Hat Enterprise Linux Server release 7.7 (Maipo)\r\n<\/code><\/pre>\n<h3>\u5728\u4e0b\u9762\u7684\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u53cd\u5411\u4ee3\u7406<\/h3>\n<pre class=\"post-pre\"><code>[root@instance ~]# vi \/etc\/nginx\/conf.d\/default.conf\r\n\r\n\r\nserver {\r\n    listen       80;\r\n    server_name  localhost;\r\n\r\n    #charset koi8-r;\r\n    #access_log  \/var\/log\/nginx\/host.access.log  main;\r\n\r\n    #http:\/\/150.136.185.120\/\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3089\u3001google\u306eHP\u306b\u9077\u79fb\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\r\n    location \/ {\r\n       proxy_pass http:\/\/www.google.com;\r\n       # root   \/usr\/share\/nginx\/html;\r\n       # index  index.html index.htm;\r\n    }\r\n\r\n    #http:\/\/150.136.185.120\/suzuki\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3089\u3001Apex\u30a2\u30d7\u30ea\u306b\u9077\u79fb\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\r\n    location \/suzuki\/{\r\n       proxy_pass https:\/\/wekggrxwysz1uoy-suzukiadb.adb.us-ashburn-1.oraclecloudapps.com\/ords\/f?p=102:1;\r\n    }\r\n\r\n    #error_page  404              \/404.html;\r\n\r\n    # redirect server error pages to the static page \/50x.html\r\n    #\r\n    error_page   500 502 503 504  \/50x.html;\r\n    location = \/50x.html {\r\n        root   \/usr\/share\/nginx\/html;\r\n    }\r\n\r\n    # proxy the PHP scripts to Apache listening on 127.0.0.1:80\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    proxy_pass   http:\/\/127.0.0.1;\r\n    #}\r\n\r\n    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    root           html;\r\n    #    fastcgi_pass   127.0.0.1:9000;\r\n    #    fastcgi_index  index.php;\r\n    #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;\r\n    #    include        fastcgi_params;\r\n    #}\r\n\r\n    # deny access to .htaccess files, if Apache's document root\r\n    # concurs with nginx's one\r\n    #\r\n    #location ~ \/\\.ht {\r\n    #    deny  all;\r\n    #}\r\n}\r\n\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883\u4fe1\u606f [user@instance ~]# cat \/etc\/redhat-release Red Hat [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32799","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>\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406 - 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\/\u4f7f\u7528nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\" \/>\n<meta property=\"og:description\" content=\"\u73af\u5883\u4fe1\u606f [user@instance ~]# cat \/etc\/redhat-release Red Hat [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-11T22:03:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T07:31:18+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\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\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/\",\"name\":\"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-11T22:03:11+00:00\",\"dateModified\":\"2024-05-04T07:31:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\"}]},{\"@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\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406 - 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\/\u4f7f\u7528nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406","og_description":"\u73af\u5883\u4fe1\u606f [user@instance ~]# cat \/etc\/redhat-release Red Hat [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-11T22:03:11+00:00","article_modified_time":"2024-05-04T07:31:18+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/","name":"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-11T22:03:11+00:00","dateModified":"2024-05-04T07:31:18+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Nginx\u914d\u7f6e\u53cd\u5411\u4ee3\u7406"}]},{"@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\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e9%85%8d%e7%bd%ae%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32799","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\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=32799"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32799\/revisions"}],"predecessor-version":[{"id":99156,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32799\/revisions\/99156"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=32799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=32799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=32799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}