{"id":64,"date":"2024-01-23T13:12:00","date_gmt":"2024-01-23T05:12:00","guid":{"rendered":"https:\/\/www.xueyaa.top\/?p=64"},"modified":"2026-03-08T13:35:11","modified_gmt":"2026-03-08T05:35:11","slug":"%e5%8d%83%e5%8f%b0%e9%9b%86%e7%be%a4%e6%9e%b6%e6%9e%84-web%e6%9c%8d%e5%8a%a1%e8%a1%a5%e5%85%85%e4%b8%8e%e5%8a%a8%e6%80%81%e7%bd%91%e7%ab%99%e6%9e%b6%e6%9e%84","status":"publish","type":"post","link":"https:\/\/www.xueyaa.top\/?p=64","title":{"rendered":"\u5343\u53f0\u96c6\u7fa4\u67b6\u6784\u2014\u2014web\u670d\u52a1\u8865\u5145\u4e0e\u52a8\u6001\u7f51\u7ad9\u67b6\u6784"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"WTNq8\">1.web\u670d\u52a1nginx\u6307\u4ee4\u8865\u5145<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"g1ywM\">1.1\u65e5\u5fd7<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9519\u8bef\u65e5\u5fd7(error_log)<\/li>\n\n\n\n<li>\u8bbf\u95ee\u65e5\u5fd7(access_log)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MDDoJ\">1\uff09\u9519\u8bef\u65e5\u5fd7<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6307\u4ee4error_log<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>error_log\u6307\u4ee4<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/td><td>error_log <em>file<\/em> [<em>level<\/em>];<\/td><\/tr><tr><td>\u9ed8\u8ba4\uff1a<\/td><td>error_log logs\/error.log error;<\/td><\/tr><tr><td>\u4e0a\u4e0b\u6587(\u653e\u5728\u54ea\u4e2a\u533a\u57df)\uff1a<\/td><td>main, http, mail, stream, server, location<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u65e5\u5fd7\u7ea7\u522b<\/li>\n<\/ul>\n\n\n\n<pre id=\"PypQT\" class=\"wp-block-code\"><code>debug, info, notice, warn, error, crit, alert, \u6216 emerg\n\u6700\u8be6\u7ec6   &gt;    &gt;        &gt;     &gt;      &gt;     &gt;       \u6700\u7c97\u7565\n\n\u4e00\u822c\u4f7f\u7528notice,\u8c03\u8bd5\u6d4b\u8bd5\u7684\u65f6\u5019\u53ef\u4ee5\u9009\u7528debug,\u7ebf\u4e0a\u751f\u4ea7\u73af\u5883\u7981\u7528DEBUG\u7ea7\u522b<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Y2PcG\">2\uff09\u8bbf\u95ee\u65e5\u5fd7<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>log_format \u5b9a\u4e49\u8bbf\u95ee\u65e5\u5fd7\u7684\u683c\u5f0f<\/li>\n\n\n\n<li>access_log \u7c7b\u4f3c\u4e8eerror_log\u6307\u5b9a\u65e5\u5fd7\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>access_log\u6307\u4ee4<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/td><td>access_log <em>path<\/em> [<em>format<\/em> [buffer=<em>size<\/em>] [gzip[=<em>level<\/em>]] [flush=<em>time<\/em>] [if=<em>condition<\/em>]];access_log off;<\/td><\/tr><tr><td>\u9ed8\u8ba4\uff1a<\/td><td>access_log logs\/access.log combined;<\/td><\/tr><tr><td>\u4e0a\u4e0b\u6587(\u653e\u5728\u54ea\u4e2a\u533a\u57df)\uff1a<\/td><td>http, server, location, if in location, limit_except<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>log_format\u6307\u4ee4<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/td><td>log_format <em>name<\/em> [escape=default|json|none] <em>string<\/em> &#8230;;<\/td><\/tr><tr><td>\u9ed8\u8ba4\uff1a<\/td><td>log_format combined &#8220;&#8230;&#8221;;<\/td><\/tr><tr><td>\u4e0a\u4e0b\u6587(\u653e\u5728\u54ea\u4e2a\u533a\u57df)\uff1a<\/td><td>http<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"w6eLd\">1.2 location\u89c4\u5219<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>location\u4e0eif\u7c7b\u4f3c<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>location\u9488\u5bf9\u8bf7\u6c42\u7684URI\u8fdb\u884c\u5224\u65ad\u548c\u8fc7\u6ee4<\/li>\n\n\n\n<li>ngx\u4e2d\u7684if\u7ed3\u5408\u5404\u79cdngx\u53d8\u91cf\u5b9e\u73b0\u5224\u65ad<\/li>\n\n\n\n<li>location\u53ea\u8d1f\u8d23\u5339\u914d\u8bf7\u6c42\u8def\u5f84,\u4e0d\u5173\u5fc3\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002404 \u9519\u8bef\u662f\u5728\u6587\u4ef6\u67e5\u627e\u9636\u6bb5\u4ea7\u751f\u7684,\u4e0d\u662flocation \u5339\u914d\u9636\u6bb5\u3002\u6bcf\u4e2a\u8bf7\u6c42\u53ea\u4f1a\u8fdb\u5165\u4e00\u4e2alocation,\u4e00\u65e6\u627e\u5230\u5339\u914d\u5c31\u7acb\u5373\u505c\u6b62\u641c\u7d22\u3002<\/li>\n<\/ul>\n\n\n\n<pre id=\"xCCyN\" class=\"wp-block-code\"><code>#\u62a5\u8fd9\u4e9b\u9519\u8bef,\u6307\u5b9a50x.html\u9519\u8bef\u9875\u9762\n  error_page  500 502 503 504 \/50x.html;\n  location = \/50x.html {\n  #\u7ad9\u70b9\u76ee\u5f55(\/)\n     root  \/usr\/share\/nginx\/html;\n  }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"eJ8Qs\">1\uff09\u6848\u4f8b1-\u6539\u9020\u5c0f\u9e1f\u98de\u98de\u7ad9\u70b9<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"G6SaR\">\u2460\u76ee\u6807<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7ed9\u5c0f\u9e1f\u98de\u98de\u7f51\u7ad9\u6dfb\u52a0\u4e00\u4e2a\/admin\/\u529f\u80fd(\u9875\u9762).\u53ea\u80fd172.16.1.0\/24\u8bbf\u95ee<\/li>\n\n\n\n<li>\u642d\u5efabird\u5c0f\u9e1f\u98de\u98de\u7f51\u7ad9,\u7ed9\u7f51\u7ad9\u52a0\u901f,\u8bbe\u7f6e\u7f13\u5b58,\u7f51\u7ad9\u4e2djs,css\u7ed3\u5c3e\u7684\u6587\u4ef6\u7f13\u5b581\u5929,\u56fe\u7247\u7f13\u5b581\u5c0f\u65f6\u3002(\u6d4f\u89c8\u5668\u7f13\u5b58&#8211;><code>F12<\/code>)<\/li>\n\n\n\n<li>\u6307\u5b9a\u9519\u8bef404\u9875\u9762<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"J5cIi\">\u2461html,css,js\u524d\u7aef\u4e09\u5251\u5ba2<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>html,css,js \u524d\u7aef\u5f00\u53d1\/\u9759\u6001\u8d44\u6e90&#8212;>\u53ea\u9700\u8981nginx\u5c31\u53ef\u4ee5\u8fd0\u884c \u6d4f\u89c8\u5668\u89e3\u6790<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>html \u4eba(\u9875\u9762)<\/li>\n\n\n\n<li>css \u8863\u670d(\u6837\u5f0f,\u6392\u7248)<\/li>\n\n\n\n<li>js(JavaScript) \u7279\u6548,\u76ae\u80a4(\u52a0\u7b80\u5355\u7684\u52a8\u6001\u6548\u679c,eg:\u624b\u673a\u53f7\u8eab\u4efd\u8bc1\u53f7\u662f\u5426\u5408\u89c4\u7684\u5224\u65ad)<\/li>\n\n\n\n<li>\u6d4b\u8bd5<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u628a\u5c0f\u9e1f\u98de\u98de\u4e2d\u7684css,js\u538b\u7f29(\u4e0d\u53ef\u7528),\u770b\u6548\u679c\u3002\u6d4b\u8bd5\u5b8c\u518d\u89e3\u538b\u7f29\u6062\u590d\u5373\u53ef\u3002<\/li>\n\n\n\n<li><code>gzip<\/code>\uff1a\u538b\u7f29<\/li>\n\n\n\n<li><code>gzip -d<\/code>\uff1a\u89e3\u538b\u7f29\uff08-d decompress = \u89e3\u538b\uff09<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"jD0xd\">\u2462\u7f13\u5b58\u6307\u4ee4<\/h4>\n\n\n\n<pre id=\"SM0ln\" class=\"wp-block-code\"><code>\u7f13\u5b58\u4f7f\u7528(\u6d4f\u89c8\u5668\u7f13\u5b58)\nexpires  1d;\nexpires  1h;\n\u6307\u4ee4<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"fn4QT\">2\uff09\u5c0f\u7ed3<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>location \/<\/code> \u4e0e<code>~<\/code>\u4e0e<code>~*<\/code> \u4e0e<code>\/\u8def\u5f84\/<\/code><\/li>\n\n\n\n<li>expires\u6307\u4ee4\u8bbe\u7f6e\u6d4f\u89c8\u5668\u7f13\u5b58,ngx\u4f18\u5316\u9879\u76ee\u4e4b\u4e00<\/li>\n\n\n\n<li>error_page \u6307\u5b9a\u9519\u8bef\u9875\u9762<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jnlCa\">1.3 nginx\u5904\u7406\u7528\u6237\u8bf7\u6c42\u6d41\u7a0b<\/h2>\n\n\n\n<p id=\"u24c6769f\"><strong>\u6587\u5b57\u63cf\u8ff0\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1.\u7528\u6237\u53d1\u51fahttp\u8bf7\u6c42(1\u4e2a<strong>\u9759\u6001<\/strong>\u8d44\u6e90)<\/li>\n\n\n\n<li>\u9996\u5148\u505aDNS\u89e3\u6790(hosts\u89e3\u6790),\u57df\u540d\u89e3\u6790ip,\u4e0e\u7f51\u7ad9\u768480\u7aef\u53e3\u4e09\u6b21\u63e1\u624b\u5efa\u7acb\u8fde\u63a5,\u53d1\u51fahttp\u8bf7\u6c42\u62a5\u6587,\u5230\u8fbe\u7f51\u7ad9\u768480\u7aef\u53e3,\u5bf9\u5e94\u7684\u662fnginx\u670d\u52a1,\u8bf7\u6c42\u5148\u5230\u8fbengx\u670d\u52a1\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u7684http\u533a\u57df,\u4f1a\u7ee7\u7eed\u627einclude\u5305\u542b\u7684\u5b50\u914d\u7f6e\u6587\u4ef6\u7684server\u533a\u57df\u768480\u7aef\u53e3\u7684\u7ad9\u70b9(\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e5f\u53ef\u80fd\u6709serve\u533a\u57df),\u6839\u636e\u8bf7\u6c42\u62a5\u6587\u4e2d\u7684host\u4e0e\u7ad9\u70b9\u4e2d\u7684serve_name\u505a\u5bf9\u6bd4,\u5982\u679c\u5bf9\u5e94\u4e0a\u4e86,\u5219\u5bf9\u5e94\u7684\u7ad9\u70b9\u5904\u7406,\u770b\u8bf7\u6c42\u4e2d\u7684URI\u7b26\u5408\u54ea\u4e2alocation\u89c4\u5219,\u82e5\u90fd\u4e0d\u7b26\u5408,\u5219location \/\u4fdd\u5e95;\u82e5\u4e0d\u662f\u52a8\u6001\u8d44\u6e90(.php\u7ed3\u5c3e),ngx\u81ea\u5df1\u5904\u7406(\u7ad9\u70b9\u76ee\u5f55+URI\u8fd4\u56de(\u54cd\u5e94\u62a5\u6587)\u7ed9\u7528\u6237.\u6709,\u8fd4\u56de200\u72b6\u6001\u7801;\u6ca1\u6709,\u8fd4\u56de\u9519\u8bef\u72b6\u6001\u7801),\u8fde\u63a5\u7559\u4e00\u4f1a(\u9884\u5224\u7528\u6237\u8fd8\u4f1a\u8bf7\u6c42),\u4e4b\u540e4\u6b21\u6325\u624b\u65ad\u5f00\u8fde\u63a5\u3002<\/li>\n\n\n\n<li>2.\u7528\u6237\u53d1\u51fahttp\u8bf7\u6c42(<strong>\u52a8\u6001<\/strong>\u8bf7\u6c42)<\/li>\n\n\n\n<li>&#8230;,\u901a\u8fc780\u7aef\u53e3\u5230\u8fbengx\u7684http\u533a\u57df,\u4f1a\u7ee7\u7eed\u627einclude\u5305\u542b\u7684\u5b50\u914d\u7f6e\u6587\u4ef6\u7684server\u533a\u57df\u768480\u7aef\u53e3\u7684\u7ad9\u70b9,\u6839\u636e\u8bf7\u6c42\u62a5\u6587\u4e2d\u7684host\u4e0e\u7ad9\u70b9\u4e2d\u7684serve_name\u505a\u5bf9\u6bd4,\u5982\u679c\u5bf9\u5e94\u4e0a\u4e86,\u5219\u5bf9\u5e94\u7684\u7ad9\u70b9\u5904\u7406,\u770b\u8bf7\u6c42\u4e2d\u7684URI\u7b26\u5408\u54ea\u4e2alocation\u89c4\u5219,(.php\u7ed3\u5c3e,location\u5728\u5904\u7406\u65f6,\u8981(\u4f20\u7403)\u628a\u8bf7\u6c42\u53d1\u9001\u7ed9\u672c\u5730\u76849000\u7aef\u53e3,\u53d1\u7684\u65f6\u5019\u5e26\u7740\u53d8\u91cf(\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84:\u7ad9\u70b9\u76ee\u5f55+URI)),php\u6536\u5230\u8fd9\u4e9b\u4fe1\u606f(\u5305\u62ec\u7528\u6237\u540d,\u5bc6\u7801),\u8bfb\u53d6\u7edd\u5bf9\u8def\u5f84\u7684php\u6587\u4ef6(\u548c\u6570\u636e\u5e93\u7684\u7528\u6237\u540d,\u5bc6\u7801\u505a\u5bf9\u6bd4),\u5bf9\u6bd4\u6210\u529f,\u8fd4\u56de301\/302\u8df3\u8f6c\u72b6\u6001\u7801(\u767b\u9646\u4e4b\u524d\u548c\u767b\u9646\u4e4b\u540e\u7684\u9875\u9762\u4e0d\u4e00\u6837)\u7684\u54cd\u5e94\u62a5\u6587\u7ed9ngx,ngx\u518d\u8fd4\u56de\u7ed9\u7528\u6237,\u7528\u6237\u6536\u5230\u767b\u5f55\u6210\u529f\u63d0\u793a\u5e76\u4e14\u8fdb\u5165\u767b\u5f55\u4e4b\u540e\u7684\u9875\u9762\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"or2Nd\">1.4 nginx\u9ed8\u8ba4\u7ad9\u70b9\u5904\u7406<\/h2>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761553096438-6b191f00-477d-426b-94a7-9c6af8a33287.png\" alt=\"\" style=\"aspect-ratio:3.591835371149863;width:381px;height:auto\" title=\"\u57fa\u4e8e\u6b64\u60c5\u51b5\u8ba8\u8bba\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ee5\u4e0a\u5747\u662f\u8bf7\u6c42\u62a5\u6587\u4e2d\u7684host\u4e0e\u7ad9\u70b9\u4e2d\u7684serve_name\u5339\u914d\u4e0a\u7684\u60c5\u51b5\u3002\u82e5\u5339\u914d\u4e0d\u4e0a,\u6216\u6709\u4eba\u6545\u610f\u7528\u4f60\u7f51\u7ad9\u4e0d\u5b58\u5728\u7684\u57df\u540d(\u4ed6\u5df2\u63d0\u524d\u505ahosts\u89e3\u6790)\u6216ip\u8bbf\u95ee,ip\u8bbf\u95ee\u7684\u8bdd\u4e5f\u4e0d\u7528\u505aDNS\u89e3\u6790\u4e86,\u4e0e\u7f51\u7ad9\u768480\u7aef\u53e3\u4e09\u6b21\u63e1\u624b\u5efa\u7acb\u8fde\u63a5,\u53d1\u51fahttp\u8bf7\u6c42\u62a5\u6587,\u901a\u8fc780\u7aef\u53e3\u5230\u8fbengx\u7684http\u533a\u57df,\u4f1a\u7ee7\u7eed\u627einclude\u5305\u542b\u7684\u5b50\u914d\u7f6e\u6587\u4ef6\u7684server\u533a\u57df\u768480\u7aef\u53e3\u7684\u7ad9\u70b9,\u6839\u636e\u8bf7\u6c42\u62a5\u6587\u4e2d\u7684host\u4e0e\u7ad9\u70b9\u4e2d\u7684serve_name\u505a\u5bf9\u6bd4,\u82e5\u90fd\u5339\u914d\u4e0d\u4e0a,\u770b\u6709\u6ca1\u6709\u9ed8\u8ba4\u7ad9\u70b9\u5904\u7406(\u7aef\u53e3\u540e\u542bdefault_server\u6307\u4ee4),\u82e5\u6709,\u5219\u8be5\u7ad9\u70b9\u5904\u7406;\u82e5\u6ca1\u6709,\u5219\u5b50\u914d\u7f6e\u6587\u4ef6\u6309\u5b57\u6bcd\u6392\u5e8f,\u6392\u5728\u7b2c\u4e00\u7684\u7ad9\u70b9\u5904\u7406(\u672a\u6765\u4e0d\u786e\u5b9a\u8c01\u5728\u7b2c\u4e00)\u3002<\/li>\n\n\n\n<li>host\u5934\u53ef\u4ee5\u6539,\u6240\u4ee5host\u7684\u4fe1\u606f\u4e0d\u4e00\u5b9a\u5c31\u662f\u76ee\u6807\u4fe1\u606f\u3002<\/li>\n\n\n\n<li>\u4f8b\u5982\uff1a<code>curl -H Host:lidao.baidu.com www.baidu.com<\/code>(\u73b0\u5728host\u5934\u5c31\u662flidao&#8230;\uff0c\u6240\u4ee5\u767e\u5ea6\u7684ngx\u5b50\u914d\u7f6e\u6587\u4ef6\u4e2d\u80af\u5b9a\u6ca1\u6709,\u5c31\u4f1a\u8d70\u9ed8\u8ba4\u7684\u7ad9\u70b9(\u56fa\u5b9a\u8f93\u51fa\u4e00\u4e2a\u9519\u8bef\u9875\u9762\u7b49))<\/li>\n<\/ul>\n\n\n\n<pre id=\"U1TRT\" class=\"wp-block-code\"><code>&#91;root@web01 ~]# cat  \/etc\/nginx\/conf.d\/default.conf\nserver {\n  listen 80 default_server;\n  server_name _;\n  root \/app\/code\/error;\n  charset utf8;\n  location \/ {\n  index  404.html;\n  }\n\n# return 418;\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761559130402-59cff01d-cb3d-4b98-9a9b-c45c45b71c60.png\" alt=\"\" style=\"aspect-ratio:1.8444093731773423;width:417px;height:auto\" title=\"\u82e5\u4e0d\u8bbe\u7f6edefault_server\uff0c\u9ed8\u8ba4\u987a\u5e8f\u6392\u5728\u7b2c\u4e00\u7684\u7ad9\u70b9\u5904\u7406\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761559151957-8924438b-eecd-4507-8115-224d1988f884.png\" alt=\"\" style=\"aspect-ratio:2.424853405502932;width:419px;height:auto\" title=\"\u6b64\u7ad9\u70b9\u76ee\u5f55\u4e0b\u9700\u5b58\u5728404.html\u9996\u9875\u6587\u4ef6\"\/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"Kpjbr\">2.\u52a8\u6001\u7f51\u7ad9\u67b6\u6784<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mzwsH\">2.1\u52a8\u6001?\u9759\u6001?<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u7f51\u7ad9\u67b6\u6784<\/td><td>\u7279\u70b9<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>\u52a8\u6001\u8d44\u6e90<\/td><td>\u670d\u52a1\u7aef\u5904\u7406\u4e0e\u52a0\u5de5,\u8bbe\u8ba1\u52a8\u6001\u8bed\u8a00php,java,python,golang.rust..(\u540e\u53f0,\u540e\u7aef)<\/td><td>\u4e00\u822c\u9700\u8981\u6570\u636e\u5e93,\u670d\u52a1\u7aef\u5904\u7406,\u7ed3\u679c\u7ed9\u7528\u6237<\/td><\/tr><tr><td>\u9759\u6001\u8d44\u6e90<\/td><td>\u670d\u52a1\u7aef\u53d1\u9001,\u5ba2\u6237\u7aef\u89e3\u6790(html,css,js)\u524d\u7aef<\/td><td>\u5ba2\u6237\u7aef\u89e3\u6790,\u670d\u52a1\u7aef\u53ea\u8d1f\u8d23\u53d1\u9001,\u7f51\u7ad9\u5904\u7406\u66f4\u5feb<\/td><\/tr><tr><td>\u6df7\u5408\u7528<\/td><td>\u9759\u6001(\u524d\u7aef\u5f00\u53d1),\u52a8\u6001(\u540e\u7aef) \u5168\u6808\u5f00\u53d1(\u524d+\u540e)<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e4b\u524d\u7684ngx\u90e8\u7f72\u5c0f\u6e38\u620f\uff1a\u9759\u6001\u7f51\u7ad9<\/li>\n\n\n\n<li>\u52a8\u6001\u7f51\u7ad9\u67b6\u6784\u5982\u4e0b\uff1a<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u5e38\u89c1\u52a8\u6001\u7f51\u7ad9\u67b6\u6784<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>lnmp(php\u4ee3\u7801)<\/td><td>linux\u7cfb\u7edf,nginx(web\u670d\u52a1),mysql(\u6570\u636e\u5e93,postgresql),php\u73af\u5883(\u52a8\u6001\u8bed\u8a00)&#8212;php\u4ee3\u7801\u5c31\u662fphp\u89e3\u91ca\u5668(\u73af\u5883)\u8fd0\u884c\u7684;java\u4ee3\u7801\u662ftomcat(\u73af\u5883)<\/td><\/tr><tr><td>lnmt<\/td><td>linux\u7cfb\u7edf,nginx(web\u670d\u52a1),mysql(\u6570\u636e\u5e93,postgresql),tomcat(java)<\/td><\/tr><tr><td>lnm?<\/td><td>linux\u7cfb\u7edf,nginx(web\u670d\u52a1),mysql(\u6570\u636e\u5e93,postgresql),\u4ec0\u4e48\u8bed\u8a00(python,golang..)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8865\u5145\uff1al&#8211;>Linux\u7cfb\u7edf w&#8211;>windows\u7cfb\u7edf n&#8211;>nginx a&#8211;>apache<\/li>\n\n\n\n<li>\u5de5\u4f5c\u573a\u666f\uff1a<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5f00\u53d1\u4e66\u5199\u4e86\u4e00\u4e2aphp\u4ee3\u7801,java,Python,Golang \u53d1\u7ed9\u6211\u4eec\u90e8\u7f72\u4e0b\u3002<\/li>\n\n\n\n<li>1.\u6d4b\u8bd5\u80fd\u5426\u76f4\u63a5\u90e8\u7f72\u5230nginx\u4e2d?<\/li>\n\n\n\n<li>2.\u9700\u8981\u4ec0\u4e48\u670d\u52a1?\u662f\u4ec0\u4e48\u539f\u7406?<\/li>\n\n\n\n<li>3.\u51c6\u5907\u670d\u52a1\u5e76\u6d4b\u8bd5<\/li>\n\n\n\n<li>4.\u90e8\u7f72\u4ee3\u7801<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"WRMqE\">2.2.\u9879\u76ee01-lnmp\u73af\u5883\u90e8\u7f72\u57282\u53f0\u673a\u5668<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"O0S3l\">1\uff09\u73af\u5883\u51c6\u5907(\u65b0\u7684)<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u89d2\u8272<\/td><td>\u4e3b\u673a\u4e0eip<\/td><\/tr><tr><td>nginx+php<\/td><td>web01 10.0.0.7\/172.16.1.7<\/td><\/tr><tr><td>\u6570\u636e\u5e93(mariadb)<\/td><td>db01 10.0.0.51\/172.16.1.51<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p id=\"uf916ec79\">\u670d\u52a1\u7248\u672c\u7684\u9009\u62e9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ngx\u4e00\u822c\u6ca1\u6709\u7248\u672c\u8981\u6c42,\u7a33\u5b9a\u5373\u53ef(ngx 1.26.xx)<\/li>\n\n\n\n<li>php\u7684\u7248\u672c\u8981\u6c42,\u6839\u636e\u4ee3\u7801\u6765\u5b9a(<a href=\"https:\/\/wordpress.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/wordpress.org\/download\/<\/a>)<\/li>\n\n\n\n<li>Recommend PHP 8.3 or greater and MySQL version 8.0 or MariaDB version 10.6 or greater.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u636e\u5e93: \u7528\u4ec0\u4e48\u548c\u4ec0\u4e48\u7248\u672c\u4e5f\u8981\u6839\u636e\u4ee3\u7801\u8981\u6c42,mariadb<\/li>\n\n\n\n<li>\u90e8\u7f72wordpress<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>nginx 1.26.1<\/li>\n\n\n\n<li>php 8.0<\/li>\n\n\n\n<li>mariadb 10.3<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"guOJG\">2\uff09\u6570\u636e\u5e93<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>web01\u673a\u5668&#8211;>mariadb<\/li>\n<\/ul>\n\n\n\n<pre id=\"F1mjX\" class=\"wp-block-code\"><code>yum install -y  mariadb-server\n# mariadb-server \u670d\u52a1\u7aef\n# mariadb \u5ba2\u6237\u7aef\n\nsystemctl enable mariadb\nsystemctl start mariadb\n\n#\u68c0\u67e5\nss -lntup |grep mysql   #3306\u7aef\u53e3\nps -ef |grep mysql  <\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u636e\u5e93\u5b89\u5168\u914d\u7f6e(SQL\u8bed\u53e5\u5b9e\u73b0,\u73b0\u5728\u5b83\u901a\u8fc7mysqlSQL\u8bed\u53e5\u5b9e\u73b0)<\/li>\n<\/ul>\n\n\n\n<pre id=\"e26Dv\" class=\"wp-block-code\"><code>mysql_secure_installation  #\u4ec5\u4ec5\u521a\u5b89\u88c5\u7684\u65f6\u5019\u8fd0\u884c.\u4ec5\u9996\u6b21\u8fd0\u884c\u5373\u53ef.\n\u7528\u4e8e\u8bbe\u7f6eroot\u5bc6\u7801,\u6e05\u7406\u7528\u6237\u548c\u6e05\u7406\u4e34\u65f6\u5e93.\n\nEnter current password for root (enter for none): \u56de\u8f66\n\nSet root password? &#91;Y\/n]  Y  #\u8bbe\u7f6e\u5bc6\u7801(lidao)\n\n\nNew password:  \u8f93\u5165\u5bc6\u7801\nRe-enter new password:  \u518d\u6b21\u8f93\u5165\nPassword updated successfully!\nReloading privilege tables..\n ... Success!\n\n\nRemove anonymous users? &#91;Y\/n]  Y  #\u5220\u9664\u6570\u636e\u5e93\u4e2d\u7684\u533f\u540d\u7528\u6237(\u6ca1\u6709\u7528\u6237\u540d\u7684\u7528\u6237,\u5bb9\u6613\u5bfc\u81f4\u5b89\u5168\u95ee\u9898)\n\n\nDisallow root login remotely? &#91;Y\/n] Y  #\u662f\u5426\u7981\u6b62root(\u6570\u636e\u5e93\u7684root)\u8fdc\u7a0b\u767b\u5f55\n\nRemove test database and access to it? &#91;Y\/n] Y  #\u662f\u5426\u5220\u9664test\u6d4b\u8bd5\u7528\u7684\u6570\u636e\u5e93\n\nReload privilege tables now? &#91;Y\/n]  Y   #\u662f\u5426\u66f4\u65b0\u6743\u9650\u4fe1\u606f\u8868<\/code><\/pre>\n\n\n\n<p id=\"ue1f29cae\">Linux\u7cfb\u7edf\u7684root\u4e0e\u6570\u636e\u5e93\u7684root\u533a\u522b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1\ufe0f\u20e32\u4e2a\u72ec\u7acb\u7684\u7528\u6237<\/li>\n\n\n\n<li>2\ufe0f\u20e3linux\u7684root\u7528\u6237\u7528\u4e8e\u8fdb\u5165\u548c\u7ba1\u7406\u6574\u4e2alinux\u7cfb\u7edf<\/li>\n\n\n\n<li>3\ufe0f\u20e3\u6570\u636e\u5e93\u7684root\u7528\u6237\u4ec5\u4ec5\u7528\u4e8e\u7ba1\u7406MySQL\u6570\u636e\u5e93<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"EAnyT\">\u2464\u5c0f\u7ed3<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SQL\u8bed\u53e5<\/li>\n\n\n\n<li>\u2b50\u67e5\u770b\uff1ashow,select \u67e5\u770b\u6570\u636e\u5e93,\u67e5\u770b\u7528\u6237<\/li>\n\n\n\n<li>\u2b50\u589e\u52a0\uff1a\u521b\u5efa\u6570\u636e\u5e93,\u521b\u5efa\u7528\u6237<\/li>\n\n\n\n<li>\u5220\u9664\uff1a\u5220\u9664\u7528\u6237,\u5220\u9664\u6570\u636e\u5e93<\/li>\n\n\n\n<li>\u6d4b\u8bd5\u8fde\u63a5 <code>mysql -u -p -h<\/code><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>-u\u7528\u6237\u540d<\/li>\n\n\n\n<li>-p\u5bc6\u7801<\/li>\n\n\n\n<li>-h \u6307\u5b9a\u6570\u636e\u5e93\u670d\u52a1\u5668ip<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761318007562-19d89dd1-7dd5-44ac-9574-1eed86eb59ef.png\" alt=\"\" style=\"aspect-ratio:1.1196430461006666;width:240px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761318070199-5cc486f4-6a24-4f0f-9274-ccd9def1eaaf.png\" alt=\"\" style=\"aspect-ratio:5.411251850633328;width:242px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"qcZJE\">3\uff09web01\u5b89\u88c5php<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>php8.0\u7248\u672c<\/li>\n<\/ul>\n\n\n\n<pre id=\"kSqHR\" class=\"wp-block-code\"><code>#1.\u6e05\u7406\u5df2\u6709\u7684php\u8f6f\u4ef6\u5305\n# systemctl stop  php-fpm\n# yum -y remove php*\n\n#2.\u5b89\u88c5\u8f6f\u4ef6\u5305\nyum -y install php php-bcmath php-cli php-common php-devel php-embedded php-fpm php-gd php-intl php-mbstring php-mysqlnd php-opcache php-pdo   php-process php-xml php-json\n\n#3.\u68c0\u67e5\u4e0e\u5f00\u673a\u81ea\u542f\u52a8\n&#91;root@web01 ~]# rpm -qa|grep php|wc -l  #\u68c0\u67e5\u8f6f\u4ef6\u5305\u6570\u91cf\n15\n&#91;root@web01 ~]# rpm -ql php-fpm|grep systemd  #\u68c0\u67e5\u670d\u52a1\u540d(systemctl\u7ba1\u7406)\n\/usr\/lib\/systemd\/system\/php-fpm.service\n......\n&#91;root@web01 ~]# systemctl enable --now php-fpm\n&#91;root@web01 ~]# ps -ef|grep php-fpm  #\u8fdb\u7a0b\u7684\u7528\u6237\u540d(\u9700\u4fee\u6539\u548cnginx\u670d\u52a1\u7684\u865a\u62df\u7528\u6237\u4e00\u81f4)\nroot       20305       1  0 21:45 ?        00:00:00 php-fpm: master process (\/etc\/php-fpm.conf)\napache     20306   20305  0 21:45 ?        00:00:00 php-fpm: pool www\napache     20307   20305  0 21:45 ?        00:00:00 php-fpm: pool www\napache     20308   20305  0 21:45 ?        00:00:00 php-fpm: pool www\napache     20309   20305  0 21:45 ?        00:00:00 php-fpm: pool www\napache     20310   20305  0 21:45 ?        00:00:00 php-fpm: pool www\n&#91;root@web01 ~]# ss -lntup |grep php  #\u67e5\u770b\u65e0\u7aef\u53e3\n\n#4.\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u8fdb\u7a0b\u7528\u6237(apache--&gt;nginx)\n&#91;root@web01 ~]# rpm -ql  php-fpm\n\/etc\/php-fpm.conf   #\u4e3b\u914d\u7f6e\u6587\u4ef6\n\/etc\/php-fpm.d\n\/etc\/php-fpm.d\/www.conf   #\u5b50\u914d\u7f6e\u6587\u4ef6(\u4fee\u6539\u7684\u76ee\u6807)\n....\n&#91;root@web01 ~]# grep -i 'include=' \/etc\/php-fpm.conf   #\u68c0\u67e5\u5b50\u914d\u7f6e\u6587\u4ef6\u7684\u4f4d\u7f6e\ninclude=\/etc\/php-fpm.d\/*.conf\n&#91;root@web01 ~]# egrep  '^listen|^user|^group' \/etc\/php-fpm.d\/www.conf \n\u4fee\u6539\u8fd93\u4e2a\u4e3a\nuser = apache   #\u6539\u4e3anginx\ngroup = apache   #\u6539\u4e3anginx\nlisten = \/run\/php-fpm\/www.sock  #\u6539\u4e3a127.0.0.1:9000\n....\n\n#5.\u4fee\u6539\u540e\u68c0\u67e5\n&#91;root@web01 ~]# egrep  -n '^(listen =|^user|^group)' \/etc\/php-fpm.d\/www.conf \n24:user = nginx\n26:group = nginx\n38:listen = 127.0.0.1:9000  #nginx\u8bbf\u95ee9000\u7aef\u53e3(\u7528\u6237\u8bf7\u6c42--&gt;ngx,ngx\u628a\u8bf7\u6c42--&gt;9000\u7aef\u53e3),nginx\u548cphp\u5728\u4e00\u53f0\u673a\u5668\u4e0a,\u6548\u679c\u7b49\u4e8elocalhost\n\n#6.\u68c0\u67e5\u8bed\u6cd5\nphp-fpm -t  #\u770b\u662f\u5426\u6709successful\n\n#7.\u91cd\u542f\u670d\u52a1\u6216reload\u670d\u52a1\u90fd\u884c\nsystemctl reload  php-fpm.service<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761314846655-1e972193-4c9e-451c-8ef6-0bb87107cc20.png\" alt=\"\" style=\"aspect-ratio:3.4745992761116855;width:525px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"cCipX\">\u2460php\u914d\u7f6e\u5c0f\u7ed3<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b89\u88c5<\/li>\n\n\n\n<li>\u914d\u7f6e\u6307\u5b9anginx\u7528\u6237<\/li>\n\n\n\n<li>\u542f\u52a8<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"AXHy5\">4\uff09nginx\u914d\u7f6e<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"whKIo\">5\uff09\u90e8\u7f72\u4ee3\u7801\u4e0e\u8bbe\u7f6e\u6743\u9650<\/h3>\n\n\n\n<pre id=\"PiFN2\" class=\"wp-block-code\"><code>\u5728Windows\u4e0b\u7684\u4f4d\u7f6e\uff1aE:\\q\u7fa4\u4e0b\u8f7d\\web\u76f8\u5173\u7684\u6e38\u620f\u4ee3\u7801\n#1.\u4e0b\u8f7d\nrz\u4e0a\u4f20\u6216\u62d6\u62fd\u5230\u5bb6\u76ee\u5f55\n\n#2\u89e3\u538b\u4e4b\u524d\u5148\u770b\u4e00\u4e0b(\u6709\u6ca1\u6709\u591a\u4e00\u5c42\u76ee\u5f55)\n&#91;root@web01 ~]# unzip -t wordpress-6.8.3-zh_CN.zip |grep index.php\n    testing: wordpress\/wp-admin\/index.php   OK\n    testing: wordpress\/wp-admin\/user\/index.php   OK\n    testing: wordpress\/wp-admin\/network\/index.php   OK\n    testing: wordpress\/index.php      OK   #\u591a\u4e86\u4e00\u5c42\n    testing: wordpress\/wp-content\/plugins\/index.php   OK\n    testing: wordpress\/wp-content\/plugins\/akismet\/index.php   OK\n    testing: wordpress\/wp-content\/themes\/twentytwentytwo\/index.php   OK\n    testing: wordpress\/wp-content\/themes\/index.php   OK\n    testing: wordpress\/wp-content\/index.php   OK\n    testing: wordpress\/wp-includes\/sitemaps\/class-wp-sitemaps-index.php   OK\n    testing: wordpress\/wp-includes\/blocks\/index.php   OK\n\n#3.\u521b\u5efa\u597d\u7ad9\u70b9\u76ee\u5f55\n&#91;root@web01 ~]# mkdir -p \/app\/code\/blog\n\n#4.\u89e3\u538b\u5230\u5f53\u524d\u76ee\u5f55\n&#91;root@web01 ~]# unzip wordpress-6.8.3-zh_CN.zip\n\n#5.\u628a\u76ee\u5f55\u4e0b\u7684\u5185\u5bb9\u79fb\u52a8\u5230\u7ad9\u70b9\u76ee\u5f55(\u53ea\u8981\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u5185\u5bb9,\u4e0d\u8981\u76ee\u5f55)\n&#91;root@web01 ~]# mv wordpress\/*  \/app\/code\/blog\/\n\n#6.\u914d\u7f6e\u7ad9\u70b9\u76ee\u5f55\u5199\u6743\u9650(\u4fee\u6539\u6240\u6709\u8005,\u7528\u6237\u7ec4)--ngx,php\u6709\u52a8\u6001\u8bed\u8a00\u4e4b\u540e\u4f1a\u5bf9\u6b64\u76ee\u5f55\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\nchown -R nginx.nginx  \/app\/code\/blog\/  #\u6743\u9650\u7ed9\u7684\u8fd8\u6709\u4e9b\u5927,\u672a\u6765\u518d\u7cbe\u7b80\n\n#7.windows\u505ahosts\u89e3\u6790\n\u5199\u5165sublime\u4fdd\u5b58\u5373\u53ef\uff1a10.0.0.7  blog.oldboy.cn\n\n#8.\u6d4f\u89c8\u5668\u8f93\u5165blog.oldboy.cn\u57df\u540d\u8bbf\u95ee\u5373\u53ef<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"wgrdQ\">6\uff09\u767b\u5f55<\/h3>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761318693042-f292ac4c-3692-4b43-844f-d5f948e7ec4e.png\" alt=\"\" style=\"aspect-ratio:1.480270947490156;width:297px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761318918390-d71fb22f-bab4-48b1-944e-4cbbeb90ee6c.png\" alt=\"\" style=\"aspect-ratio:1.1672529095014765;width:300px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761319333103-9fa7aece-c054-4dcc-8844-c63c038b6f61.png\" alt=\"\" style=\"aspect-ratio:2.981972487242068;width:299px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b89\u88c5WordPress\u540e,\u6210\u529f,\u518d\u67e5\u770bblog\u6570\u636e\u5e93,\u81ea\u52a8\u521b\u5efa\u597d\u4e86\u4ee5\u4e0b\u8868\u4fe1\u606f\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761319782880-3a68c520-1424-493b-8b0b-4a7d565728f8.png\" alt=\"\" style=\"aspect-ratio:1.1204864640987988;width:243px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761320011164-65ff3331-9931-4ba5-b295-1f540a332079.png\" alt=\"\" style=\"aspect-ratio:0.9203012423281051;width:248px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"saRzw\">7\uff09\u5199\u6587\u7ae0\u6d4b\u8bd5<\/h3>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761320777786-21986bea-be73-49b2-b46e-20f119192a81.png\" alt=\"\" style=\"aspect-ratio:2.8561704646345074;width:413px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761321115040-ac3516ac-23b8-470e-8503-93c61fe134ef.png\" alt=\"\" style=\"aspect-ratio:16.08106491175591;width:417px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2025\/png\/29112972\/1761321208973-875ed45c-f200-40e7-9b77-d9875b94f8b9.png\" alt=\"\" style=\"aspect-ratio:6.481673498914878;width:419px;height:auto\" title=\"\"\/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"tS5jm\">\u603b\u7ed3<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u52a8\u6001\u7f51\u7ad9\u67b6\u6784lnmp\u7684\u4f7f\u7528,\u90e8\u7f72wordpress\u535a\u5ba2(PHP\u4ee3\u7801\u5199\u7684)<\/li>\n\n\n\n<li>\u9519\u8bef\u65e5\u5fd7,\u8bbf\u95ee\u65e5\u5fd7<\/li>\n\n\n\n<li>\u8bbf\u95ee\u65e5\u5fd7\u7684\u5185\u5bb9(\u5206\u6790)<\/li>\n\n\n\n<li>location\u89c4\u5219<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1.web\u670d\u52a1nginx\u6307\u4ee4\u8865\u5145 1.1\u65e5\u5fd7 1\uff09\u9519\u8bef\u65e5\u5fd7 error_log\u6307\u4ee4 \u8bf4\u660e \u8bed\u6cd5\u683c\u5f0f\uff1a erro [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":41,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-64","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=64"}],"version-history":[{"count":1,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions\/65"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=\/wp\/v2\/media\/41"}],"wp:attachment":[{"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xueyaa.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}