{"id":58339,"date":"2025-08-16T08:24:47","date_gmt":"2025-08-16T00:24:47","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/58339.html"},"modified":"2025-08-16T08:24:47","modified_gmt":"2025-08-16T00:24:47","slug":"nginx%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%88%e4%ba%94%ef%bc%89-nginx%e5%90%8e%e7%ab%af%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%bb%84%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/58339.html","title":{"rendered":"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e"},"content":{"rendered":"<h4>&#x1f4e6; Nginx\u5b66\u4e60\u7b14\u8bb0&#xff08;\u4e94&#xff09;\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e<\/h4>\n<h5>\u2699\ufe0f \u4e00\u3001upstream\u6a21\u5757\u67b6\u6784\u89e3\u6790<\/h5>\n<p>  #mermaid-svg-86KFfZFF6SaSgNck {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-86KFfZFF6SaSgNck .error-icon{fill:#552222;}#mermaid-svg-86KFfZFF6SaSgNck .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-86KFfZFF6SaSgNck .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-86KFfZFF6SaSgNck .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-86KFfZFF6SaSgNck .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-86KFfZFF6SaSgNck .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-86KFfZFF6SaSgNck .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-86KFfZFF6SaSgNck .marker{fill:#333333;stroke:#333333;}#mermaid-svg-86KFfZFF6SaSgNck .marker.cross{stroke:#333333;}#mermaid-svg-86KFfZFF6SaSgNck svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-86KFfZFF6SaSgNck .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-86KFfZFF6SaSgNck .cluster-label text{fill:#333;}#mermaid-svg-86KFfZFF6SaSgNck .cluster-label span{color:#333;}#mermaid-svg-86KFfZFF6SaSgNck .label text,#mermaid-svg-86KFfZFF6SaSgNck span{fill:#333;color:#333;}#mermaid-svg-86KFfZFF6SaSgNck .node rect,#mermaid-svg-86KFfZFF6SaSgNck .node circle,#mermaid-svg-86KFfZFF6SaSgNck .node ellipse,#mermaid-svg-86KFfZFF6SaSgNck .node polygon,#mermaid-svg-86KFfZFF6SaSgNck .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-86KFfZFF6SaSgNck .node .label{text-align:center;}#mermaid-svg-86KFfZFF6SaSgNck .node.clickable{cursor:pointer;}#mermaid-svg-86KFfZFF6SaSgNck .arrowheadPath{fill:#333333;}#mermaid-svg-86KFfZFF6SaSgNck .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-86KFfZFF6SaSgNck .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-86KFfZFF6SaSgNck .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-86KFfZFF6SaSgNck .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-86KFfZFF6SaSgNck .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-86KFfZFF6SaSgNck .cluster text{fill:#333;}#mermaid-svg-86KFfZFF6SaSgNck .cluster span{color:#333;}#mermaid-svg-86KFfZFF6SaSgNck div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-86KFfZFF6SaSgNck :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-A-B\" class=\"edgeLabel L-LS-A&#039; L-LE-B\"><\/span><\/p>\n<p>         <span id=\"L-L-B-C\" class=\"edgeLabel L-LS-B&#039; L-LE-C\"><\/span><\/p>\n<p>         <span id=\"L-L-C-D\" class=\"edgeLabel L-LS-C&#039; L-LE-D\"><\/span><\/p>\n<p>         <span id=\"L-L-C-E\" class=\"edgeLabel L-LS-C&#039; L-LE-E\"><\/span><\/p>\n<p>         <span id=\"L-L-C-F\" class=\"edgeLabel L-LS-C&#039; L-LE-F\"><\/span><\/p>\n<p>         <span id=\"L-L-D-G\" class=\"edgeLabel L-LS-D&#039; L-LE-G\"><\/span><\/p>\n<p>         <span id=\"L-L-E-G\" class=\"edgeLabel L-LS-E&#039; L-LE-G\"><\/span><\/p>\n<p>         <span id=\"L-L-F-G\" class=\"edgeLabel L-LS-F&#039; L-LE-G\"><\/span><\/p>\n<p>         <span id=\"L-L-G-H\" class=\"edgeLabel L-LS-G&#039; L-LE-H\"><\/span><\/p>\n<p>          \u5ba2\u6237\u7aef\u8bf7\u6c42<\/p>\n<p>          Nginx\u524d\u7aef<\/p>\n<p>          upstream\u6a21\u5757<\/p>\n<p>          \u540e\u7aef\u670d\u52a1\u56681<\/p>\n<p>          \u540e\u7aef\u670d\u52a1\u56682<\/p>\n<p>          \u540e\u7aef\u670d\u52a1\u56683<\/p>\n<p>          \u8fd4\u56de\u54cd\u5e94<\/p>\n<p>          \u5ba2\u6237\u7aef<\/p>\n<p>\u6838\u5fc3\u673a\u5236&#xff1a; Nginx\u7684upstream\u6a21\u5757\u5efa\u7acb\u4e86\u4e00\u4e2a\u865a\u62df\u670d\u52a1\u5668\u6c60&#xff0c;\u901a\u8fc7\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u5c06\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u4e2a\u540e\u7aef\u670d\u52a1\u5668\u3002\u8fd9\u79cd\u67b6\u6784\u63d0\u4f9b\u4e09\u5927\u6838\u5fc3\u80fd\u529b&#xff1a;<\/p>\n<li>\u6545\u969c\u8f6c\u79fb&#xff1a;\u81ea\u52a8\u68c0\u6d4b\u5e76\u7ed5\u8fc7\u6545\u969c\u8282\u70b9<\/li>\n<li>\u6c34\u5e73\u6269\u5c55&#xff1a;\u901a\u8fc7\u589e\u52a0\u540e\u7aef\u670d\u52a1\u5668\u63d0\u5347\u7cfb\u7edf\u5bb9\u91cf<\/li>\n<li>\u4f1a\u8bdd\u4fdd\u6301&#xff1a;\u786e\u4fdd\u7279\u5b9a\u5ba2\u6237\u7aef\u8bf7\u6c42\u8def\u7531\u5230\u76f8\u540c\u540e\u7aef<\/li>\n<h5>&#x1f4cc; \u4e8c\u3001\u57fa\u7840\u914d\u7f6e\u8bed\u6cd5<\/h5>\n<p>http {<br \/>\n    upstream backend {<br \/>\n        # \u670d\u52a1\u5668\u914d\u7f6e<br \/>\n        server 192.168.1.101:8080 weight&#061;5;<br \/>\n        server 192.168.1.102:8080;<br \/>\n        server backup.example.com:8080 backup;<\/p>\n<p>        # \u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5<br \/>\n        least_conn;<\/p>\n<p>        # \u5065\u5eb7\u68c0\u67e5<br \/>\n        max_fails&#061;3;<br \/>\n        fail_timeout&#061;30s;<br \/>\n    }<\/p>\n<p>    server {<br \/>\n        location \/ {<br \/>\n            proxy_pass http:\/\/backend;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h5>\u2696 \u4e09\u3001\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\u6df1\u5ea6\u89e3\u6790<\/h5>\n<p>  #mermaid-svg-dxQmxkLp2x471FOG {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-dxQmxkLp2x471FOG .error-icon{fill:#552222;}#mermaid-svg-dxQmxkLp2x471FOG .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-dxQmxkLp2x471FOG .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-dxQmxkLp2x471FOG .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-dxQmxkLp2x471FOG .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-dxQmxkLp2x471FOG .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-dxQmxkLp2x471FOG .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-dxQmxkLp2x471FOG .marker{fill:#333333;stroke:#333333;}#mermaid-svg-dxQmxkLp2x471FOG .marker.cross{stroke:#333333;}#mermaid-svg-dxQmxkLp2x471FOG svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-dxQmxkLp2x471FOG .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-dxQmxkLp2x471FOG .cluster-label text{fill:#333;}#mermaid-svg-dxQmxkLp2x471FOG .cluster-label span{color:#333;}#mermaid-svg-dxQmxkLp2x471FOG .label text,#mermaid-svg-dxQmxkLp2x471FOG span{fill:#333;color:#333;}#mermaid-svg-dxQmxkLp2x471FOG .node rect,#mermaid-svg-dxQmxkLp2x471FOG .node circle,#mermaid-svg-dxQmxkLp2x471FOG .node ellipse,#mermaid-svg-dxQmxkLp2x471FOG .node polygon,#mermaid-svg-dxQmxkLp2x471FOG .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-dxQmxkLp2x471FOG .node .label{text-align:center;}#mermaid-svg-dxQmxkLp2x471FOG .node.clickable{cursor:pointer;}#mermaid-svg-dxQmxkLp2x471FOG .arrowheadPath{fill:#333333;}#mermaid-svg-dxQmxkLp2x471FOG .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-dxQmxkLp2x471FOG .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-dxQmxkLp2x471FOG .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-dxQmxkLp2x471FOG .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-dxQmxkLp2x471FOG .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-dxQmxkLp2x471FOG .cluster text{fill:#333;}#mermaid-svg-dxQmxkLp2x471FOG .cluster span{color:#333;}#mermaid-svg-dxQmxkLp2x471FOG div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-dxQmxkLp2x471FOG :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-A-B\" class=\"edgeLabel L-LS-A&#039; L-LE-B\"><\/span><\/p>\n<p>         <span id=\"L-L-B-C\" class=\"edgeLabel L-LS-B&#039; L-LE-C\">\u8f6e\u8be2<\/span><\/p>\n<p>         <span id=\"L-L-B-D\" class=\"edgeLabel L-LS-B&#039; L-LE-D\">\u52a0\u6743\u8f6e\u8be2<\/span><\/p>\n<p>         <span id=\"L-L-B-E\" class=\"edgeLabel L-LS-B&#039; L-LE-E\">IP\u54c8\u5e0c<\/span><\/p>\n<p>         <span id=\"L-L-B-F\" class=\"edgeLabel L-LS-B&#039; L-LE-F\">\u6700\u5c11\u8fde\u63a5<\/span><\/p>\n<p>         <span id=\"L-L-B-G\" class=\"edgeLabel L-LS-B&#039; L-LE-G\">\u968f\u673a<\/span><\/p>\n<p>          \u8bf7\u6c42<\/p>\n<p>          \u8d1f\u8f7d\u5747\u8861\u7b56\u7565<\/p>\n<p>          Server1<\/p>\n<p>          Server2<\/p>\n<p>          Server3<\/p>\n<p>          Server4<\/p>\n<p>          Server5<\/p>\n<li>\n<p>\u8f6e\u8be2&#xff08;Round Robin&#xff09; \u9ed8\u8ba4\u7b56\u7565&#xff0c;\u6309\u914d\u7f6e\u6587\u4ef6\u987a\u5e8f\u4f9d\u6b21\u5206\u53d1\u8bf7\u6c42<\/p>\n<p> upstream backend {<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}\n <\/li>\n<li>\n<p>\u52a0\u6743\u8f6e\u8be2&#xff08;Weighted Round Robin&#xff09; \u6839\u636e\u670d\u52a1\u5668\u5904\u7406\u80fd\u529b\u5206\u914d\u6743\u91cd<\/p>\n<p> upstream backend {<br \/>\n    server 192.168.1.101 weight&#061;3; # \u5904\u740660%\u8bf7\u6c42<br \/>\n    server 192.168.1.102 weight&#061;2; # \u5904\u740640%\u8bf7\u6c42<br \/>\n}\n <\/li>\n<li>\n<p>IP\u54c8\u5e0c&#xff08;IP Hash&#xff09; \u57fa\u4e8e\u5ba2\u6237\u7aefIP\u7684\u4f1a\u8bdd\u4fdd\u6301\u65b9\u6848<\/p>\n<p> upstream backend {<br \/>\n    ip_hash;<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}\n <\/li>\n<li>\n<p>\u6700\u5c11\u8fde\u63a5&#xff08;Least Connections&#xff09; \u52a8\u6001\u9009\u62e9\u5f53\u524d\u8fde\u63a5\u6570\u6700\u5c11\u7684\u670d\u52a1\u5668<\/p>\n<p> upstream backend {<br \/>\n    least_conn;<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}\n <\/li>\n<li>\n<p>\u968f\u673a\u8d1f\u8f7d&#xff08;Random&#xff09; \u968f\u673a\u9009\u62e9\u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u652f\u6301\u52a0\u6743\u968f\u673a<\/p>\n<p> upstream backend {<br \/>\n    random;<br \/>\n    server 192.168.1.101 weight&#061;2;<br \/>\n    server 192.168.1.102 weight&#061;1;<br \/>\n}\n <\/li>\n<h5>&#x1fa7a; \u56db\u3001\u5065\u5eb7\u68c0\u67e5\u4e0e\u5bb9\u9519\u673a\u5236<\/h5>\n<p>upstream backend {<br \/>\n    server 192.168.1.101 max_fails&#061;3 fail_timeout&#061;30s;<br \/>\n    server 192.168.1.102 max_fails&#061;2 fail_timeout&#061;60s;<\/p>\n<p>    # \u88ab\u52a8\u5065\u5eb7\u68c0\u67e5<br \/>\n    health_check interval&#061;5s fails&#061;3 passes&#061;2;<br \/>\n    health_check_timeout 3s;<\/p>\n<p>    # \u5907\u4efd\u670d\u52a1\u5668<br \/>\n    server backup1.example.com:8080 backup;<br \/>\n    server backup2.example.com:8080 backup;<br \/>\n}<\/p>\n<p>\u5065\u5eb7\u68c0\u67e5\u53c2\u6570\u8be6\u89e3&#xff1a;<\/p>\n<table>\n<tr>\u53c2\u6570\u9ed8\u8ba4\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>max_fails<\/td>\n<td>1<\/td>\n<td>\u5141\u8bb8\u5931\u8d25\u6b21\u6570<\/td>\n<\/tr>\n<tr>\n<td>fail_timeout<\/td>\n<td>10s<\/td>\n<td>\u5931\u8d25\u540e\u6682\u505c\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td>slow_start<\/td>\n<td>0<\/td>\n<td>\u6062\u590d\u540e\u6743\u91cd\u6e10\u53d8\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td>backup<\/td>\n<td>&#8211;<\/td>\n<td>\u6807\u8bb0\u4e3a\u5907\u7528\u670d\u52a1\u5668<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>&#x1f517; \u4e94\u3001\u8fde\u63a5\u4f18\u5316\u53c2\u6570<\/h5>\n<p>upstream backend {<br \/>\n    server 192.168.1.101;<\/p>\n<p>    # \u8fde\u63a5\u6c60\u8bbe\u7f6e<br \/>\n    keepalive 32;       # \u6bcf\u4e2aworker\u4fdd\u6301\u7684\u8fde\u63a5\u6570<br \/>\n    keepalive_requests 1000; # \u5355\u4e2a\u8fde\u63a5\u6700\u5927\u8bf7\u6c42\u6570<br \/>\n    keepalive_timeout 60s;   # \u7a7a\u95f2\u8fde\u63a5\u8d85\u65f6<\/p>\n<p>    # \u8fde\u63a5\u53c2\u6570<br \/>\n    proxy_connect_timeout 3s; # \u8fde\u63a5\u540e\u7aef\u8d85\u65f6<br \/>\n    proxy_read_timeout 30s;   # \u8bfb\u53d6\u54cd\u5e94\u8d85\u65f6<br \/>\n    proxy_send_timeout 30s;   # \u53d1\u9001\u8bf7\u6c42\u8d85\u65f6<br \/>\n}<\/p>\n<h5>&#x1f9e9; \u516d\u3001\u591a\u573a\u666f\u914d\u7f6e\u6848\u4f8b<\/h5>\n<li>\n<p>\u591a\u534f\u8bae\u652f\u6301<\/p>\n<p> # TCP\u8d1f\u8f7d\u5747\u8861<br \/>\nstream {<br \/>\n    upstream tcp_backend {<br \/>\n        server 192.168.1.101:3306;<br \/>\n        server 192.168.1.102:3306;<br \/>\n    }<br \/>\n    server {<br \/>\n        listen 3306;<br \/>\n        proxy_pass tcp_backend;<br \/>\n    }<br \/>\n}<\/p>\n<p># UDP\u8d1f\u8f7d\u5747\u8861<br \/>\nstream {<br \/>\n    upstream dns_servers {<br \/>\n        server 192.168.1.201:53;<br \/>\n        server 192.168.1.202:53;<br \/>\n    }<br \/>\n    server {<br \/>\n        listen 53 udp;<br \/>\n        proxy_pass dns_servers;<br \/>\n    }<br \/>\n}\n <\/li>\n<li>\n<p>\u591a\u533a\u57df\u90e8\u7f72<\/p>\n<p> upstream global_backend {<br \/>\n    # \u5317\u7f8e\u533a\u57df<br \/>\n    server us-east1.example.com;<br \/>\n    server us-west1.example.com;<\/p>\n<p>    # \u6b27\u6d32\u533a\u57df<br \/>\n    server eu-central1.example.com;<\/p>\n<p>    # \u6545\u969c\u8f6c\u79fb<br \/>\n    server backup.example.com backup;<br \/>\n}\n <\/li>\n<li>\n<p>\u91d1\u4e1d\u96c0\u53d1\u5e03<\/p>\n<p> upstream backend {<br \/>\n    # \u6b63\u5f0f\u7248\u672c (90%\u6d41\u91cf)<br \/>\n    server 192.168.1.101 weight&#061;90;<\/p>\n<p>    # \u91d1\u4e1d\u96c0\u7248\u672c (10%\u6d41\u91cf)<br \/>\n    server 192.168.1.102 weight&#061;10;<br \/>\n}\n <\/li>\n<li>\n<p>\u4f1a\u8bdd\u6301\u4e45\u5316<\/p>\n<p> # \u57fa\u4e8ecookie\u7684\u4f1a\u8bdd\u4fdd\u6301<br \/>\nupstream backend {<br \/>\n    sticky cookie srv_id expires&#061;1h domain&#061;.example.com path&#061;\/;<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}<\/p>\n<p># \u57fa\u4e8e\u8def\u7531\u7684\u4f1a\u8bdd\u4fdd\u6301<br \/>\nmap $request_uri $persist_key {<br \/>\n    ~\/user\/([^\/]&#043;) $1;<br \/>\n    default $remote_addr;<br \/>\n}<\/p>\n<p>upstream backend {<br \/>\n    hash $persist_key consistent;<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}\n <\/li>\n<h5>&#x1f6e1; \u4e03\u3001\u5b89\u5168\u589e\u5f3a\u914d\u7f6e<\/h5>\n<p>upstream backend {<br \/>\n    server 192.168.1.101;<\/p>\n<p>    # \u8bbf\u95ee\u63a7\u5236<br \/>\n    deny 192.168.1.50;  # \u5c4f\u853d\u7279\u5b9aIP<br \/>\n    allow 10.0.0.0\/8;   # \u5141\u8bb8\u5185\u7f51\u8bbf\u95ee<\/p>\n<p>    # SSL\u7ec8\u7aef\u5230\u7ec8\u7aef\u52a0\u5bc6<br \/>\n    server 192.168.1.102:443 ssl;<br \/>\n    ssl_certificate     \/etc\/nginx\/ssl\/server.crt;<br \/>\n    ssl_certificate_key \/etc\/nginx\/ssl\/server.key;<\/p>\n<p>    # \u8fde\u63a5\u9650\u5236<br \/>\n    zone backend 10m;    # \u5171\u4eab\u5185\u5b58\u533a<br \/>\n    queue 100 timeout&#061;60s; # \u6392\u961f\u8bf7\u6c42\u6570<br \/>\n}<\/p>\n<h5>&#x1f4ca; \u516b\u3001\u76d1\u63a7\u4e0e\u65e5\u5fd7<\/h5>\n<p># \u81ea\u5b9a\u4e49\u65e5\u5fd7\u683c\u5f0f<br \/>\nlog_format upstream_log &#039;$remote_addr &#8211; $upstream_addr &#039;<br \/>\n                        &#039;$upstream_status $upstream_response_time &#039;<br \/>\n                        &#039;&#034;$request&#034; $status $body_bytes_sent&#039;;<\/p>\n<p># upstream\u72b6\u6001\u76d1\u63a7<br \/>\nlocation \/upstream_status {<br \/>\n    stub_status;<br \/>\n    allow 127.0.0.1;<br \/>\n    deny all;<br \/>\n    access_log off;<br \/>\n}<\/p>\n<p># Prometheus\u76d1\u63a7<br \/>\nlocation \/metrics {<br \/>\n    content_by_lua_block {<br \/>\n        metric_connections &#061; ngx.shared.metrics:get(&#034;connections&#034;) or 0<br \/>\n        ngx.say(&#034;nginx_upstream_connections &#034;, metric_connections)<br \/>\n    }<br \/>\n}<\/p>\n<h5>\u26a0 \u4e5d\u3001\u5e38\u89c1\u9677\u9631\u4e0e\u89e3\u51b3\u65b9\u6848<\/h5>\n<li>\n<p>502 Bad Gateway\u9519\u8bef<\/p>\n<p> # \u89e3\u51b3\u65b9\u6848&#xff1a;\u8c03\u6574\u8d85\u65f6\u53c2\u6570<br \/>\nproxy_connect_timeout 5s;<br \/>\nproxy_read_timeout 60s;<br \/>\nproxy_next_upstream_timeout 0;<br \/>\nproxy_next_upstream_tries 3;\n <\/li>\n<li>\n<p>\u540e\u7aef\u670d\u52a1\u5668\u8fc7\u8f7d<\/p>\n<p> # \u89e3\u51b3\u65b9\u6848&#xff1a;\u6dfb\u52a0\u9650\u6d41<br \/>\nlimit_req_zone $binary_remote_addr zone&#061;backend:10m rate&#061;10r\/s;<\/p>\n<p>location \/ {<br \/>\n    limit_req zone&#061;backend burst&#061;20;<br \/>\n    proxy_pass http:\/\/backend;<br \/>\n}\n <\/li>\n<li>\n<p>\u4f1a\u8bdd\u4e0d\u4e00\u81f4\u95ee\u9898<\/p>\n<p> # \u89e3\u51b3\u65b9\u6848&#xff1a;\u542f\u7528\u4f1a\u8bdd\u4fdd\u6301<br \/>\nupstream backend {<br \/>\n    sticky route $request_uri;<br \/>\n    server 192.168.1.101;<br \/>\n    server 192.168.1.102;<br \/>\n}\n <\/li>\n<h5>&#x1f9ea; \u5341\u3001\u6027\u80fd\u538b\u6d4b\u65b9\u6848<\/h5>\n<p># \u4f7f\u7528wrk\u8fdb\u884c\u538b\u529b\u6d4b\u8bd5<br \/>\nwrk -t12 -c400 -d30s -s post.lua http:\/\/backend.example.com\/api<\/p>\n<p># \u76d1\u63a7\u547d\u4ee4<br \/>\nwatch -n 1 &#034;echo &#039;show pools&#039; | nc 127.0.0.1 9000 | grep backend&#034;<\/p>\n<p>\u6027\u80fd\u4f18\u5316\u53c2\u6570&#xff1a;<\/p>\n<p>events {<br \/>\n    worker_connections 10240; # \u589e\u52a0\u8fde\u63a5\u6570<br \/>\n}<\/p>\n<p>http {<br \/>\n    # \u5185\u6838\u4f18\u5316<br \/>\n    sendfile on;<br \/>\n    tcp_nopush on;<br \/>\n    tcp_nodelay on;<\/p>\n<p>    # upstream\u8fde\u63a5\u590d\u7528<br \/>\n    proxy_http_version 1.1;<br \/>\n    proxy_set_header Connection &#034;&#034;;<br \/>\n}<\/p>\n<h5>&#x1f50d; \u914d\u7f6e\u9a8c\u8bc1\u4e0e\u8c03\u8bd5<\/h5>\n<p># \u8be6\u7ec6\u65e5\u5fd7\u8bb0\u5f55<br \/>\nproxy_set_header X-Real-IP $remote_addr;<br \/>\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\nlog_format debug_log &#039;$upstream_addr $upstream_response_time $upstream_status&#039;;<\/p>\n<p># \u8c03\u8bd5\u7aef\u70b9<br \/>\nlocation \/backend_debug {<br \/>\n    proxy_pass http:\/\/backend;<br \/>\n    add_header X-Backend-Addr $upstream_addr;<br \/>\n    add_header X-Backend-Response-Time $upstream_response_time;<br \/>\n    access_log \/var\/log\/nginx\/backend_debug.log debug_log;<br \/>\n}<\/p>\n<p>&#x1f4da; \u63a8\u8350\u9605\u8bfb&#xff1a; Nginx\u5b98\u65b9\u6587\u6863 &#8211; HTTP\u8d1f\u8f7d\u5747\u8861 Nginx Cookbook &#8211; \u9ad8\u7ea7\u8d1f\u8f7d\u5747\u8861\u6280\u672f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb756\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86Nginx\u7684upstream\u6a21\u5757\u914d\u7f6e\u4e0e\u4f18\u5316\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1\uff09upstream\u6a21\u5757\u67b6\u6784\u89e3\u6790\uff0c\u9610\u8ff0\u5176\u8d1f\u8f7d\u5747\u8861\u3001\u6545\u969c\u8f6c\u79fb\u548c\u4f1a\u8bdd\u4fdd\u6301\u4e09\u5927\u6838\u5fc3\u80fd\u529b\uff1b2\uff09\u57fa\u7840\u914d\u7f6e\u8bed\u6cd5\u4e0e\u591a\u79cd\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\uff08\u8f6e\u8be2\u3001\u52a0\u6743\u8f6e\u8be2\u3001IP\u54c8\u5e0c\u7b49\uff09\uff1b3\uff09\u5065\u5eb7\u68c0\u67e5\u673a\u5236\u4e0e\u5bb9\u9519\u53c2\u6570\u8bbe\u7f6e\uff1b4\uff09\u8fde\u63a5\u4f18\u5316\u53c2\u6570\u914d\u7f6e\uff1b5\uff09\u591a\u573a\u666f\u5e94\u7528\u6848\u4f8b\uff08\u591a\u534f\u8bae\u652f\u6301\u3001\u91d1\u4e1d\u96c0\u53d1\u5e03\u7b49\uff09\uff1b6\uff09\u5b89\u5168\u589e\u5f3a\u914d\u7f6e\u5efa\u8bae\u3002\u6587\u7ae0\u901a\u8fc7\u5927\u91cf\u914d\u7f6e\u793a\u4f8b\u548c\u6d41\u7a0b\u56fe\uff0c\u5168\u9762\u5c55\u793a\u4e86Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u7684\u914d\u7f6e\u65b9\u6cd5\u4e0e\u6700\u4f73\u5b9e\u8df5\u3002<\/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":[117,5249,371,43,305,44],"topic":[],"class_list":{"0":"post-58339","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-server","7":"tag-nginx","9":"tag-371","10":"tag-43","11":"tag-305","12":"tag-44"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/58339.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb756\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86Nginx\u7684upstream\u6a21\u5757\u914d\u7f6e\u4e0e\u4f18\u5316\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1\uff09upstream\u6a21\u5757\u67b6\u6784\u89e3\u6790\uff0c\u9610\u8ff0\u5176\u8d1f\u8f7d\u5747\u8861\u3001\u6545\u969c\u8f6c\u79fb\u548c\u4f1a\u8bdd\u4fdd\u6301\u4e09\u5927\u6838\u5fc3\u80fd\u529b\uff1b2\uff09\u57fa\u7840\u914d\u7f6e\u8bed\u6cd5\u4e0e\u591a\u79cd\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\uff08\u8f6e\u8be2\u3001\u52a0\u6743\u8f6e\u8be2\u3001IP\u54c8\u5e0c\u7b49\uff09\uff1b3\uff09\u5065\u5eb7\u68c0\u67e5\u673a\u5236\u4e0e\u5bb9\u9519\u53c2\u6570\u8bbe\u7f6e\uff1b4\uff09\u8fde\u63a5\u4f18\u5316\u53c2\u6570\u914d\u7f6e\uff1b5\uff09\u591a\u573a\u666f\u5e94\u7528\u6848\u4f8b\uff08\u591a\u534f\u8bae\u652f\u6301\u3001\u91d1\u4e1d\u96c0\u53d1\u5e03\u7b49\uff09\uff1b6\uff09\u5b89\u5168\u589e\u5f3a\u914d\u7f6e\u5efa\u8bae\u3002\u6587\u7ae0\u901a\u8fc7\u5927\u91cf\u914d\u7f6e\u793a\u4f8b\u548c\u6d41\u7a0b\u56fe\uff0c\u5168\u9762\u5c55\u793a\u4e86Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u7684\u914d\u7f6e\u65b9\u6cd5\u4e0e\u6700\u4f73\u5b9e\u8df5\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/58339.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-16T00:24:47+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/58339.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/58339.html\",\"name\":\"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-16T00:24:47+00:00\",\"dateModified\":\"2025-08-16T00:24:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/58339.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/58339.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/58339.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/58339.html","og_locale":"zh_CN","og_type":"article","og_title":"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb756\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86Nginx\u7684upstream\u6a21\u5757\u914d\u7f6e\u4e0e\u4f18\u5316\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1\uff09upstream\u6a21\u5757\u67b6\u6784\u89e3\u6790\uff0c\u9610\u8ff0\u5176\u8d1f\u8f7d\u5747\u8861\u3001\u6545\u969c\u8f6c\u79fb\u548c\u4f1a\u8bdd\u4fdd\u6301\u4e09\u5927\u6838\u5fc3\u80fd\u529b\uff1b2\uff09\u57fa\u7840\u914d\u7f6e\u8bed\u6cd5\u4e0e\u591a\u79cd\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\uff08\u8f6e\u8be2\u3001\u52a0\u6743\u8f6e\u8be2\u3001IP\u54c8\u5e0c\u7b49\uff09\uff1b3\uff09\u5065\u5eb7\u68c0\u67e5\u673a\u5236\u4e0e\u5bb9\u9519\u53c2\u6570\u8bbe\u7f6e\uff1b4\uff09\u8fde\u63a5\u4f18\u5316\u53c2\u6570\u914d\u7f6e\uff1b5\uff09\u591a\u573a\u666f\u5e94\u7528\u6848\u4f8b\uff08\u591a\u534f\u8bae\u652f\u6301\u3001\u91d1\u4e1d\u96c0\u53d1\u5e03\u7b49\uff09\uff1b6\uff09\u5b89\u5168\u589e\u5f3a\u914d\u7f6e\u5efa\u8bae\u3002\u6587\u7ae0\u901a\u8fc7\u5927\u91cf\u914d\u7f6e\u793a\u4f8b\u548c\u6d41\u7a0b\u56fe\uff0c\u5168\u9762\u5c55\u793a\u4e86Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u7684\u914d\u7f6e\u65b9\u6cd5\u4e0e\u6700\u4f73\u5b9e\u8df5\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/58339.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-16T00:24:47+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/58339.html","url":"https:\/\/www.wsisp.com\/helps\/58339.html","name":"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-16T00:24:47+00:00","dateModified":"2025-08-16T00:24:47+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/58339.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/58339.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/58339.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Nginx\u5b66\u4e60\u7b14\u8bb0\uff08\u4e94\uff09\u2014\u2014Nginx\u540e\u7aef\u670d\u52a1\u5668\u7ec4\u914d\u7f6e"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/58339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=58339"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/58339\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=58339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=58339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=58339"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=58339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}