{"id":30734,"date":"2025-04-21T02:06:04","date_gmt":"2025-04-20T18:06:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/30734.html"},"modified":"2025-04-21T02:06:04","modified_gmt":"2025-04-20T18:06:04","slug":"web%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%ae-%ef%bc%88apachenginx%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/30734.html","title":{"rendered":"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09"},"content":{"rendered":"<h2>\u2f00\u3001web\u57fa\u672c\u6982\u5ff5\u548c\u5e38\u8bc6<\/h2>\n<p>Web&#xff1a;\u4e3a\u2f64\u6237\u63d0\u4f9b\u7684\u2f00\u79cd\u5728\u4e92\u8054\u2f79\u4e0a\u6d4f\u89c8\u4fe1\u606f\u7684\u670d\u52a1&#xff0c;Web \u670d\u52a1\u662f\u52a8\u6001\u7684\u3001\u53ef\u4ea4\u4e92\u7684\u3001\u8de8\u5e73\u53f0\u7684\u548c\u56fe\u5f62\u5316\u7684\u3002<\/p>\n<p>Web \u670d\u52a1\u4e3a\u2f64\u6237\u63d0\u4f9b\u5404\u79cd\u4e92\u8054\u2f79\u670d\u52a1&#xff0c;\u8fd9\u4e9b\u670d\u52a1\u5305\u62ec\u4fe1\u606f\u6d4f\u89c8\u670d\u52a1&#xff0c;\u4ee5\u53ca\u5404\u79cd\u4ea4\u4e92\u5f0f\u670d\u52a1&#xff0c;\u5305\u62ec\u804a\u5929\u3001\u8d2d\u7269\u3001\u5b66\u4e60\u7b49\u7b49\u5185\u5bb9\u3002<\/p>\n<p>Web \u5e94\u2f64\u5f00\u53d1\u4e5f\u7ecf\u8fc7\u4e86\u2f0f\u4ee3\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55&#xff0c;\u2f6c\u524d Web \u5f00\u53d1\u4f9d \u7136\u662f\u6700\u91cd\u8981\u7684\u5f00\u53d1\u5185\u5bb9\u4e4b\u2f00\u3002Web \u57fa\u7840\u7684\u6280\u672f\u5305\u62ec\u8d85\u2f42\u672c\u6807\u8bb0 \u8bed\u2f94&#xff08;HTML&#xff09;\u548c HTTP \u534f\u8bae&#xff0c;HTML \u662f\u2f00\u79cd\u5448\u73b0\u6570\u636e\u7684\u2f45\u5f0f &#xff08;\u7ed9\u2f08\u770b\u7684&#xff09;&#xff0c;\u2f7d HTTP \u5219\u662f\u2f00\u7ec4\u901a\u4fe1\u7684\u6807\u51c6&#xff08;\u8bed\u6cd5\u3001\u8bed\u4e49\u3001\u65f6\u8bb8&#xff09;&#xff0c;\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a HTTP \u643a\u5e26 HTML\u3002<\/p>\n<\/p>\n<p>1.web \u5e94\u2f64&#xff1a;\u2f79\u7ad9&#xff08;\u2f34\u4e49\u4e0a\u7684PC&#xff0c;\u2f3f\u673aapp&#xff09;<\/p>\n<p>2.\u6d4f\u89c8\u5668&#xff08;Browser&#xff09;&#xff1a;\u4e5f\u79f0\u2f64\u6237\u4ee3\u7406&#xff0c;web\u5ba2\u6237\u7aef&#xff0c;\u4e3b\u8981\u6709IE\u3001Edge\u3001Chrome\u3001Firefox\u3001\u817e\u8baf\u6d4f\u89c8\u5668&#xff0c;360\u6d4f\u89c8\u5668\u7b49\u3002<\/p>\n<p>3.web\u670d\u52a1\u5668&#xff08;web server&#xff09;&#xff1a;\u4e5f\u79f0HTTP\u670d\u52a1\u5668&#xff08;HTTP server&#xff09;&#xff0c;\u4e3b\u8981\u6709 Nginx\u3001Apache\u3001Tomcat \u7b49\u3002<\/p>\n<p>\u4e8c\u3001apache\u670d\u52a1<\/p>\n<p>&#xff08;1&#xff09;Apache \u6982\u5ff5 \u00a0<\/p>\n<p>1\u3001\u6982\u8ff0 \u00a0 \u6700\u65e9\u7684 web \u670d\u52a1\u7a0b\u5e8f&#xff0c;\u57fa\u4e8e http \u534f\u8bae\u63d0\u4f9b\u2f79\u2eda\u6d4f\u89c8\u670d\u52a1\u3002 \u00a0<\/p>\n<p>2\u3001\u7279\u70b9 \u00a0 \u6a21\u5757\u5316\u8bbe\u7f6e\u3001\u5f00\u653e\u6e90\u4ee3\u7801\u3001\u8de8\u5e73\u53f0\u5e94\u2f64\u3001\u2f40\u6301\u591a\u79cd web \u7f16\u7a0b\u8bed\u2f94\u3001\u8fd0\u2f8f\u7a33\u5b9a\u3002 \u00a0<\/p>\n<p>3\u3001\u2f2f\u4f5c\u6a21\u5f0f\u00a0<\/p>\n<p>&#xff08;1&#xff09;Prefork&#xff1a;\u4f7f\u2f64\u8fdb\u7a0b\u5904\u7406\u8bf7\u6c42&#xff0c;\u5728\u8be5\u6a21\u5f0f\u4e2d\u2f50\u8f83\u6d88\u8017\u5185\u5b58&#xff0c;\u4f46\u7a33\u5b9a\u6027\u2fbc&#xff0c;\u5982\u67d0\u4e2a\u8fdb\u7a0b\u51fa\u73b0\u95ee\u9898&#xff0c;\u4e0d\u4f1a\u5f71\u54cd\u5176\u4ed6\u8bf7\u6c42\u3002<\/p>\n<p>&#xff08;2&#xff09;Worker&#xff1a;\u5c5e\u4e8e\u591a\u8fdb\u7a0b\u6a21\u5f0f&#xff0c;\u6bcf\u4e2a\u8fdb\u7a0b\u2f63\u6210\u591a\u4e2a\u8fdb\u7a0b;\u5728\u8be5\u6a21\u5f0f\u4e0b\u6d88\u8017\u7684\u8d44\u6e90\u2f50\u8f83\u2f29&#xff0c;\u9002\u5408\u2fbc\u5e76\u53d1\u8bf7\u6c42&#xff0c;\u4f46\u7a33\u5b9a\u6027\u6ca1\u6709 Prefork \u6a21\u5f0f\u7a33\u5b9a\u3002<\/p>\n<p>&#xff08;3&#xff09;Event&#xff1a;\u8be5\u6a21\u5f0f\u4e0e Worker \u6a21\u5f0f\u8f83\u4e3a\u76f8\u4f3c&#xff0c;\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u5728\u8be5\u6a21\u5f0f\u4e0b\u53ef\u4ee5\u89e3\u51b3keepalive \u2ed3\u8fde\u63a5\u65f6\u5360\u2f64\u7ebf\u7a0b\u8d44\u6e90\u5bfc\u81f4\u6d6a\u8d39\u7684\u95ee\u9898\u3002<\/p>\n<p>&#xff08;4&#xff09;keep-alive \u2ed3\u8fde\u63a5&#xff1a;TCP\u8fde\u63a5\u5728\u53d1\u9001\u540e\u5c06\u4ecd\u7136\u4fdd\u6301\u6253\u5f00\u72b6\u6001&#xff0c;\u4e8e\u662f&#xff0c;\u6d4f\u89c8\u5668\u53ef\u4ee5\u7ee7\u7eed\u901a\u8fc7\u76f8\u540c\u7684\u8fde\u63a5\u53d1\u9001\u8bf7\u6c42\u3002\u4fdd\u6301\u8fde\u63a5\u8282\u7701\u4e86\u4e3a \u6bcf\u4e2a\u8bf7\u6c42\u5efa\u2f74\u65b0\u8fde\u63a5\u6240\u9700\u7684\u65f6\u95f4&#xff0c;\u8fd8\u8282\u7ea6\u4e86\u5e26\u5bbd\u3002\u5b9e\u73b0\u2ed3\u8fde\u63a5\u8981\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u90fd\u2f40\u6301\u2ed3\u8fde\u63a5\u3002<\/p>\n<p>&#xff08;2&#xff09;\u642d\u5efa apache \u670d\u52a1\u5668<\/p>\n<p>1\u3001\u5b89\u88c5\u5e76\u8bbe\u7f6e\u9632\u2f55\u5899<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"579\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180601-68053789aa69b.png\" width=\"565\" \/><\/p>\n<p>2.\u5b89\u88c5httpd\u670d\u52a1\u00a0<\/p>\n<p>[root&#064;web ~]# yum -y install httpd<br \/>\n\u67e5\u770b\u5b89\u88c5\u60c5\u51b5\u4ee5\u53ca\u5b89\u88c5\u7684\u8d44\u6e90\u6587\u4ef6<br \/>\n[root&#064;web ~]#rpm -qa | grep httpd<br \/>\n[root&#064;web ~]#rpm -ql httpd<br \/>\n[root&#064;web ~]#ls \/etc\/httpd\/<br \/>\n[root&#064;web ~]#vim \/etc\/httpd\/conf\/httpd.conf<br \/>\n[root&#064;web ~]#ls \/var\/www\/html\/<br \/>\n\u67e5\u770b\u7aef\u2f1d\u786e\u8ba4apache\u5df2\u542f\u2f64<br \/>\n[root&#064;web ~]#netstat -lnput | grep http<br \/>\n\u68c0\u67e5\u9632\u706b\u5899<br \/>\n[root&#064;web ~]#systemctl status firewalld<br \/>\n\u4e0d\u80fd\u76f4\u63a5\u7981\u7528\u9632\u706b\u5899&#xff0c;\u53ef\u4ee5\u5355\u72ec\u6253\u5f00\u7aef\u53e3\/\u670d\u52a1<br \/>\n[root&#064;web ~]#firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;80\/tcp &#8211;permanent<br \/>\n[root&#064;web ~]#firewall-cmd &#8211;zone&#061;public &#8211;add-service&#061;http &#8211;permanent<br \/>\n\u6253\u5f00\u670d\u52a1\u4e0d\u4f1a\u9a6c\u4e0a\u751f\u6548&#xff0c;\u9700\u8981\u91cd\u542f\u6216\u8005\u91cd\u8f7d\u670d\u52a1\u4fe1\u606f(\u91cd\u8f7d\u9632\u2f55\u5899\u89c4\u5219)<br \/>\n[root&#064;web ~]#firewall-cmd &#8211;reload<br \/>\n#\u67e5\u770b\u5f53\u524d\u533a\u57df\u4e0b\u9632\u2f55\u5899\u6240\u6709\u89c4\u5219<br \/>\n[root&#064;web ~]# firewall-cmd &#8211;list-all<br \/>\n[root&#064;web ~]#cd \/var\/www\/html\/<\/p>\n<p>[root&#064;web html]# systemctl restart httpd.service <\/p>\n<p>[root&#064;web html]# echo &#034;\u6211\u662f\u9759\u6001\u9875\u9762&#034; &gt; index.html<\/p>\n<p>[root&#064;web html]# rz -E<\/p>\n<p>rz waiting to receive.<\/p>\n<p>[root&#064;web html]# ls<\/p>\n<p>haha.jpg  index.html<\/p>\n<p>\u6d4f\u89c8\u5668\u8bbf\u95eeip&#xff1a;\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"655\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180601-68053789dae11.png\" width=\"585\" \/><\/p>\n<h5>3.apache \u7d22\u5f15\u2f42\u4ef6<\/h5>\n<p>\u5f53\u5728\u8d44\u6e90\u76ee\u5f55\u4e2d\u6dfb\u52a0index.html\u4e4b\u540e&#xff0c;html\u670d\u52a1\u4f1a\u81ea\u52a8\u627e\u5230index\u6587\u4ef6<\/p>\n<p>\u5728\u2f00\u822c\u7684\u524d\u6bb5\u670d\u52a1\u5668\u4e2dhttp nginx tomcat&#xff0c;\u5728\u6ca1\u6709\u6307\u5b9a\u2f42\u4ef6\u8def\u5f84\u7684\u65f6\u5019&#xff0c;\u9ed8\u8ba4\u5148\u8bbf\u95ee\u8d44\u6e90\u2f42\u4ef6\u5939\u4e2d\u7684index.xxx<\/p>\n<p>.\/html\/index.html<\/p>\n<p>httpd \u4f7f\u2f64 yum \u5b89\u88c5\u65f6&#xff0c;\u9ed8\u8ba4\u7684\u7ad9html\u2f42\u4ef6\u5728\/var\/www\/html\/index.html&#xff0c;\u5982\u679c index.html \u2f42\u4ef6\u4e0d\u5b58\u5728&#xff0c;\u9700\u8981\u2f3f\u52a8\u521b\u5efa<\/p>\n<p>\u5728\u2f79\u7ad9\u2f45\u2faf&#xff0c;index\u901a\u5e38\u662f\u6307\u4e3b\u2f6c\u5f55\u7684\u610f\u601d&#xff0c;index.html\u662f\u2f6c\u5f55\u4e0b\u9ed8\u8ba4\u6253\u5f00\u7684\u2eda\u2faf\u3002<\/p>\n<p>\u2f50\u5982&#xff0c;\u2f79\u7ad9\u7684\u57df\u540d\u662fwww.abc.com&#xff0c;\u5982\u679c\u8bbe\u7f6e\u4e86 index.html \u662f<\/p>\n<p>\u9ed8\u8ba4\u4e3b\u2eda&#xff0c;\u90a3\u4e48\u6253\u5f00 http:\/\/www.abc.com \u548c\u6253\u5f00\u2eda\u2faf http:\/\/www.abc.com\/index.html \u5c31\u662f\u2f00\u6837\u7684\u3002\u4ed6\u4eec\u6253\u5f00\u7684\u90fd\u662f\u2f79\u7ad9\u2fb8\u2eda,\u56e0\u4e3aindex.html\u662f\u2f79\u7ad9\u9ed8\u8ba4\u7684\u4e3b\u2eda\u3002<\/p>\n<p>\u5728 index.html \u5199\u2f0a\u5982\u4e0b\u5185\u5bb9&#xff0c;\u53ef\u4ee5\u8ba9\u4e3b\u2eda\u663e\u793a\u2f00\u4e2a\u5706\u5f62&#xff0c;\u5706\u2f3c\u5904\u663e\u793a\u2f42\u5b57\u201c\u8fd9\u5c31\u662f\u4e3b\u2eda\u201d<\/p>\n<p>[root&#064;web html]# vim \/var\/www\/html\/index.html<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"465\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180602-6805378a22873.png\" width=\"568\" \/><\/p>\n<p>\u91cd\u542f\u670d\u52a1 \u00a0<\/p>\n<p>[root&#064;shell ~]# systemctl restart httpd \u00a0<\/p>\n<p>4.\u670d\u52a1\u5668\u8bbf\u95ee\u6d4b\u8bd5<\/p>\n<p>\u6d4f\u89c8\u5668\u5185\u8f93\u2f0a\u642d\u5efa\u597d\u7684 httpd \u670d\u52a1\u5668 IP \u5730\u5740\u6216\u57df\u540d&#xff08;IP:192.168.2.21&#xff09;<\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"285\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180602-6805378a507ee.png\" width=\"546\" \/><\/p>\n<\/p>\n<p>\u4e09\u3001\u90e8\u7f72nginx\u670d\u52a1<\/p>\n<p>1\u3001Nginx \u7b80\u4ecb \u00a0 \u00a0Nginx&#xff08;engine X&#xff09;&#xff1a;\u5f00\u6e90\u3001\u8f7b\u91cf\u7ea7\u3001\u2fbc\u6027\u80fd\u7684 HTTP \u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u53ef\u4ee5\u4ee3\u7406 HTTP\u3001IMAP\/POP3\/SMTP \u548c TCP\/UDP\u534f\u8bae\u3002 \u00a0 \u00a0<\/p>\n<p>\u57fa\u672c\u7279\u70b9&#xff1a;\u5360\u2f64\u5185\u5b58\u5c11\u3001\u5e76\u53d1\u80fd\u2f12\u5f3a&#xff0c;\u91c7\u2f64 C \u8bed\u2f94\u7f16\u5199&#xff0c;\u5728\u6027\u80fd\u2f45\u2faf\u6709\u2f00\u5b9a\u4fdd\u8bc1\u3002 \u00a0 \u00a0<\/p>\n<p>Nginx \u53ef\u4ee5\u2f64\u6765\u505a\u8d1f\u8f7d\u5747\u8861\u53ca\u53cd\u5411\u4ee3\u7406\u4f7f\u2f64&#xff0c;\u2f6c\u524d\u4f7f\u2f64\u6700\u591a\u7684\u662f \u00a0 \u8d1f\u8f7d\u5747\u8861\u3002 \u00a0 \u00a0<\/p>\n<p>\u4e0e Nginx \u540c\u7c7b\u7684 Web \u670d\u52a1\u6709 Apache\u3001Tomcat \u7b49\u3002 \u00a0 \u00a0<\/p>\n<p>\u5b98\u2f45\u2f79\u7ad9&#xff1a;http:\/\/nginx.org\/ \u00a0<\/p>\n<p>2\u3001Nginx \u670d\u52a1\u5668\u7279\u70b9 \u00a0<\/p>\n<p>&#xff08;1&#xff09;\u6a21\u5757\u5316\u8bbe\u8ba1 \u00a0Nginx \u5c06\u6a21\u5757\u5206\u4e3a\u6838\u2f3c\u6a21\u5757\u3001HTTP \u6a21\u5757\u3001\u4e8b\u4ef6\u6a21\u5757\u548c\u90ae\u4ef6\u6a21\u5757\u56db\u7c7b\u3002\u6bcf\u4e2a\u6a21\u5757\u90fd\u6709\u7279\u5b9a\u7684\u804c\u8d23&#xff0c;\u4ece\u2f7d\u5b9e\u73b0\u4e86\u6574\u4e2a Web \u670d\u52a1\u5668\u7684\u529f\u80fd\u3002\u00a0\u00a0<\/p>\n<p>&#xff08;2&#xff09;\u4f4e\u5185\u5b58\u6d88\u8017&#xff0c;\u2fbc\u5e76\u53d1 \u00a0Nginx \u4f7f\u2f64 epoll and kqueue \u4f5c\u4e3a\u5f00\u53d1\u2f2f\u5177&#xff0c;\u80fd\u591f\u2f40\u6301\u6700\u2f2450000 \u4e2a\u5e76\u53d1\u8fde\u63a5\u6570\u7684\u54cd\u5e94&#xff1b;\u4e0d\u8bba\u662f\u7cfb\u7edf\u8d44\u6e90\u5f00\u9500\u8fd8\u662f CPU \u4f7f\u2f64\u6548\u7387\u90fd\u5f88\u4f18\u79c0\u3002 \u00a0<\/p>\n<p>&#xff08;3&#xff09;\u4e8b\u4ef6\u9a71\u52a8 \u00a0nginx \u91c7\u2f64\u5f02\u6b65\u2f45\u5f0f\u5904\u7406\u8bf7\u6c42\u3002 \u00a0 \u540c\u6b65&#xff1a;\u6307\u5728\u53d1\u9001\u2f45\u53d1\u51fa\u6d88\u606f\u540e&#xff0c;\u9700\u8981\u7b49\u5f85\u63a5\u6536\u5230\u63a5\u6536\u2f45\u53d1\u56de\u7684\u54cd\u5e94&#xff0c;\u6216\u8005\u901a\u8fc7\u56de\u8c03\u51fd\u6570\u6765\u63a5\u6536\u5230\u5bf9\u2f45\u54cd\u5e94\u4fe1\u606f\u3002 \u00a0 \u5f02\u6b65&#xff1a;\u6307\u5728\u53d1\u9001\u2f45\u53d1\u51fa\u8bf7\u6c42\u540e&#xff0c;\u63a5\u6536\u2f45\u4e0d\u9700\u8981\u8fd4\u56de\u6d88\u606f\u6216\u8005\u4e0d\u7b49\u5f85\u8fd4\u56de\u6d88\u606f&#xff0c;\u76f4\u63a5\u63d0\u4f9b\u54cd\u5e94\u8bf7\u6c42\u673a\u5236\u3002 \u00a0<\/p>\n<p>&#xff08;4&#xff09;\u2fbc\u53ef\u9760\u6027&#xff0c;master \u4e0e worker \u67b6\u6784 \u00a0\u2f00\u4e2a\u4e3b\u8fdb\u7a0b\u548c\u591a\u4e2a\u2f2f\u4f5c\u8fdb\u7a0b\u3002\u2f2f\u4f5c\u8fdb\u7a0b\u662f\u5355\u7ebf\u7a0b\u7684&#xff0c;\u4e14\u4e0d\u9700\u8981\u7279\u6b8a\u6388\u6743\u5373\u53ef\u8fd0\u2f8f&#xff1b; \u00a0 master\u8fdb\u7a0b&#xff1a;\u4e3b\u8981\u2f64\u6765\u76d1\u63a7worker\u8fdb\u7a0b\u2f2f\u4f5c\u72b6\u6001\u8fdb\u2f8f\u76f8\u5e94\u91cd\u542f\u3001\u505c\u2f4c\u7b49\u64cd\u4f5c\u3002 \u00a0 worker\u8fdb\u7a0b&#xff1a;\u8fdb\u2f8f\u5177\u4f53\u63d0\u4f9b\u670d\u52a1&#xff0c;\u63a5\u53d7\u8bf7\u6c42\u548c\u5904\u7406\u8bf7\u6c42\u3002 \u00a0<\/p>\n<p>&#xff08;5&#xff09;\u2f40\u6301\u70ed\u66f4\u65b0\u914d\u7f6e\u3001\u2f47\u5fd7\u2f42\u4ef6\u6eda\u52a8\u3001\u5e73\u6ed1\u5347\u7ea7 \u00a0\/usr\/local\/nginx\/sbin\/nginx -s reload \u00a0html\u2f6c\u5f55\u4e2d\u7684\u2f42\u4ef6\u53d1\u4e0a\u4fee\u6539\u4e4b\u540e&#xff0c;\u4e0d\u9700\u8981nginx\u670d\u52a1 \u00a0 \u53ef\u5411 master \u53d1\u9001 USR1\u3001QUIT \u7b49\u4fe1\u53f7&#xff0c;\u2f46\u9700\u5f3a\u5236\u505c\u2f4c\u670d\u52a1\u5373\u53ef\u5b8c\u6210\u70ed\u66f4\u65b0\u3002 \u00a0 \u5411 master \u53d1\u9001\u7684 USR1&#xff0c;\u53ef\u5b9e\u73b0\u2f47\u5fd7\u2f42\u4ef6\u6eda\u52a8\u3002 \u00a0 \u5411 master \u53d1\u9001\u7684 USR2&#xff0c;\u53ef\u5b9e\u73b0\u5e73\u6ed1\u5347\u7ea7\u3002 \u00a0<\/p>\n<p>&#xff08;6&#xff09;\u4e30\u5bcc\u7684\u6269\u5c55\u6a21\u5757 \u00a0\u53ef\u5728\u7f16\u8bd1\u5b89\u88c5 nginx \u65f6\u6307\u5b9a\u62d3\u5c55\u6a21\u5757&#xff0c;\u4f8b\u5982&#xff1a;nginx-sticky-module \u6a21\u5757&#xff08;\u57fa\u4e8e cookie \u6765\u8fdb\u2f8f\u8d1f\u8f7d\u8f6c\u53d1&#xff09;\u3002 \u00a0<\/p>\n<p>3\u3001Nginx \u548c Apache \u533a\u522b \u00a0<\/p>\n<p>&#xff08;1&#xff09;\u67b6\u6784 \u00a0Apache \u91c7\u2f64\u591a\u8fdb\u7a0b\u67b6\u6784&#xff0c;\u6bcf\u4e2a\u8bf7\u6c42\u90fd\u7531\u2f00\u4e2a\u72ec\u2f74\u7684\u8fdb\u7a0b\u5904\u7406&#xff1b; \u2f7dNginx\u91c7\u2f64\u5f02\u6b65\u4e8b\u4ef6\u9a71\u52a8\u7684\u67b6\u6784&#xff0c;\u53ef\u4ee5\u5904\u7406\u66f4\u591a\u7684\u5e76\u53d1\u8fde\u63a5\u3002 \u00a0<\/p>\n<p>&#xff08;2&#xff09;\u6027\u80fd \u00a0\u7531\u4e8eNginx\u7684\u67b6\u6784\u8bbe\u8ba1&#xff0c;\u5b83\u53ef\u4ee5\u5904\u7406\u66f4\u591a\u7684\u5e76\u53d1\u8fde\u63a5&#xff0c;\u2f7d\u4e14\u5728\u2fbc\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u8868\u73b0\u66f4\u52a0\u7a33\u5b9a\u548c\u53ef\u9760\u3002\u56e0\u6b64&#xff0c;Nginx\u901a\u5e38\u88ab\u8ba4\u4e3a\u662f\u2f50Apache\u66f4\u2fbc\u6548\u7684Web\u670d\u52a1\u5668 \u00a0<\/p>\n<p>&#xff08;3&#xff09;\u914d\u7f6e \u00a0Apache \u7684\u914d\u7f6e\u2f42\u4ef6\u2f50\u8f83\u590d\u6742&#xff0c;\u9700\u8981\u2f00\u5b9a\u7684\u5b66\u4e60\u548c\u7ecf\u9a8c\u624d\u80fd\u6b63\u786e\u914d\u7f6e&#xff1b;\u2f7d Nginx \u7684\u914d\u7f6e\u2f42\u4ef6\u2f50\u8f83\u7b80\u6d01\u548c\u53ef\u8bfb\u6027\u5f3a&#xff0c;\u66f4\u5bb9\u6613\u7406\u89e3\u548c\u914d\u7f6e\u3002 \u00a0<\/p>\n<p>&#xff08;4&#xff09;\u529f\u80fd \u00a0nginx\u6709\u8bb8\u591a\u6a21\u5757\u53ef\u4ee5\u6269\u5c55\u5176\u529f\u80fd&#xff0c;\u4f8b\u5982 mod_rewrite \u2f64\u4e8eURL \u91cd\u5199&#xff0c;mod_ssl\u2f64\u4e8e SSL \u52a0\u5bc6\u7b49&#xff1b;\u2f7dapach \u7684\u529f\u80fd\u2f50\u8f83\u7b80\u5355&#xff0c;\u4f46\u662f\u53ef\u4ee5\u901a\u8fc7\u7b2c\u4e09\u2f45\u6a21\u5757\u6269\u5c55\u5176\u529f\u80fd\u3002<\/p>\n<p>web\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"222\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180602-6805378a7a972.png\" width=\"559\" \/><\/p>\n<h4>4.Nginx \u5b89\u88c5<\/h4>\n<h5>(1).\u4e0b\u8f7d\u5b89\u88c5nginx<\/h5>\n<p>[root&#064;web ~]# wget https:\/\/nginx.org\/download\/nginx-1.26.1.tar.gz<\/p>\n<h5>(2).\u89e3\u538b<\/h5>\n<p>[root&#064;web ~ ]# tar -zxvf nginx-1.26.1.tar.gz<\/p>\n<h5>(3).\u7f16\u8bd1\u5b89\u88c5 nginx<\/h5>\n<h6>&#xff08;1&#xff09;\u5b89\u88c5 pcre<\/h6>\n<p>\u2fb8\u5148\u5b89\u88c5 pcre\u3002\u6b64\u8f6f\u4ef6\u662f\u4e3a\u4e86\u2f40\u6301 rewrite&#xff08;\u91cd\u5199\u3001\u590d\u5199&#xff09;\u529f\u80fd\u2f7d\u5b58\u5728\u7684\u3002rewrite \u662f\u5b9e\u73b0 url \u91cd\u5b9a\u5411\u7684\u91cd\u8981\u547d\u4ee4&#xff0c;\u5b83\u4f1a\u6839\u636e\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u5185\u5bb9&#xff0c;\u4ece\u2f7d\u8df3\u8f6c\u5230\u2f6c\u6807\u4e0a\u2faf\u53bb\u3002<\/p>\n<p>[root&#064;web ~]# yum -y install pcre-devel<\/p>\n<h6>&#xff08;2&#xff09;\u5b89\u88c5 OpenSSL<\/h6>\n<p>\u5f53\u6ca1\u6709\u4f7f\u2f64 ssl \u8bc1\u4e66\u5bf9\u670d\u52a1\u5668\u6570\u636e\u8fdb\u2f8f\u52a0\u5bc6\u8ba4\u8bc1\u65f6&#xff0c;\u2f64\u6237\u7684\u6570\u636e\u5c06\u4f1a\u4ee5\u660e\u2f42\u7684\u5f62\u5f0f\u8fdb\u2f8f\u4f20\u8f93&#xff0c;\u2f7d\u6b64\u65f6&#xff0c;\u2f64\u6237\u7684\u6570\u636e\u53ef\u4ee5\u88ab\u2f00\u4e9b\u6293\u5305\u2f2f\u5177\u83b7\u53d6&#xff0c;\u5c31\u5bb9\u6613\u9020\u6210\u2f64\u6237\u7684\u4fe1\u606f\u6cc4\u9732\u3002<\/p>\n<p>\u6240\u4ee5\u4e3a\u4e86\u6539\u5584\u8fd9\u79cd\u60c5\u51b5&#xff0c;\u4f5c\u4e3a\u8fd0\u7ef4\u2f08\u5458\u9700\u8981\u53bb\u4e3a\u2f79\u7ad9\u914d\u7f6e ssl \u8bc1\u4e66&#xff0c;\u5b9e\u73b0 https \u534f\u8bae\u7684\u8bbf\u95ee<\/p>\n<h6>&#xff08;3&#xff09;\u5728\u5b89\u88c5\u4e4b\u524d\u8fd8\u8981\u5b89\u88c5\u2f64\u6765\u7f16\u8bd1\u7684\u2f2f\u5177<\/h6>\n<p>gcc\u3001gcc-c&#043;&#043;\u3001make&#xff1b;lrzsz \u662f\u2f64\u6765\u4ece Windows \u4e0a\u76f4\u63a5\u5c06\u2f42\u4ef6\u5bfc\u2f0a\u5230 Linux \u5185\u7684\u2f2f\u5177\u3002<\/p>\n<p>[root&#064;web ~]# yum -y install gcc gcc-c&#043;&#043; make<\/p>\n<h6>&#xff08;4&#xff09;\u7f16\u8bd1\u5b89\u88c5 nginx<\/h6>\n<p>\u5982\u679c\u4e4b\u524d\u5728\u7cfb\u7edf\u4e0a\u6709 yum \u5b89\u88c5\u7684 nginx&#xff0c;\u90a3\u4e48\u5728\u7f16\u8bd1\u5b89\u88c5\u4e4b\u524d \u9700\u8981\u5148\u5378\u8f7d\u6389\u539f\u6765\u7684 nginx\u3002<\/p>\n<p>\u5378\u8f7dnginx:yum -y remove nginx<\/p>\n<\/p>\n<p>[root&#064;web ~]# ls<\/p>\n<p>nginx-1.26.1 nginx-1.26.1.tar.gz<\/p>\n<p>cd\u5230\u5b89\u88c5\u5305\u2f6c\u5f55\u4e0b<\/p>\n<p>[root&#064;web ~]# cd nginx-1.26.1\/[root&#064;web nginx-1.26.1]# lsauto CHANGES.ru configure html man srcCHANGES conf contrib LICENSE README[root&#064;web nginx-1.26.1]# .\/configure &#8211;prefix&#061;\/usr\/local\/nginx &#8211;user&#061;nginx &#8211;group&#061;nginx &#8211;with-http_ssl_module &#8211;with-http_stub_status_module &#8211;with-http_realip_module &#8211;with-stream<\/p>\n<p>\u547d\u4ee4\u5206\u6b65\u89e3\u91ca&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"324\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180602-6805378aa3f6c.png\" width=\"547\" \/><\/p>\n<p>[root&#064;web nginx-1.26.1]# make &amp;&amp; make install<\/p>\n<p>[root&#064;web nginx-1.26.1]# useradd -s \/bin\/nologin -M nginx<\/p>\n<p>\u68c0\u67e5\u76ee\u5f55<\/p>\n<p>[root&#064;web nginx-1.26.1]# tree \/usr\/local\/nginx<\/p>\n<p>[root&#064;web nginx-1.26.1]# cd \/usr\/local\/nginx\/<\/p>\n<p>[root&#064;web nginx]# ls<\/p>\n<p>conf html logs sbin<\/p>\n<p>\u5907\u4efd\u76ee\u5f55<\/p>\n<p>[root&#064;web nginx]# cp -r conf\/ conf.bak<\/p>\n<p>[root&#064;web nginx]# .\/sbin\/nginx<\/p>\n<p>\u5f00\u653e\u7aef\u53e3\u6216\u8005\u670d\u52a1<\/p>\n<p>[root&#064;web nginx]# firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;80\/tcp &#8211;permanent<\/p>\n<p>success<\/p>\n<p>[root&#064;web nginx]# firewall-cmd &#8211;reload<\/p>\n<p>success<\/p>\n<p>[root&#064;web nginx]# vim \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n<p>\u521b\u5efa\u7b26\u53f7\u94fe\u63a5&#xff08;\u8f6f\u94fe\u63a5&#xff09;<\/p>\n<p>[root&#064;web nginx]# ln -s \/usr\/local\/nginx\/sbin\/nginx \/usr\/bin\/<\/p>\n<p>[root&#064;web nginx]# ls -l \/usr\/bin\/nginx<\/p>\n<p>lrwxrwxrwx. 1 root root 27 7\u6708 29 16:16 \/usr\/bin\/nginx -&gt; \/usr\/local\/nginx\/sbin\/nginx<\/p>\n<p>[root&#064;web nginx]# nginx<\/p>\n<p>[root&#064;web nginx]# nginx -s stop<\/p>\n<p>[root&#064;web nginx]# netstat -lnput|grep nginx<\/p>\n<p>[root&#064;web nginx]# nginx<\/p>\n<p>[root&#064;web nginx]# netstat -lnput|grep nginx<\/p>\n<p>tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 17228\/nginx: master<\/p>\n<\/p>\n<p>\u542f\u52a8\u548c\u5173\u95ednginx\u670d\u52a1<\/p>\n<p>.\/nginx .\/nginx -s reload<\/p>\n<p>\u4fee\u6539\u4e86\u914d\u7f6e\u6587\u4ef6\u540e&#xff0c;\u91cd\u8f7dnginx\u670d\u52a1\u7f51<\/p>\n<p>.\/nginx -s reload<\/p>\n<\/p>\n<p>\u811a\u672c\u542f\u52a8nginx\u670d\u52a1&#xff1a;<\/p>\n<p>[root&#064;web nginx]# vim ~\/nginx.sh<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"203\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180602-6805378acec10.png\" width=\"554\" \/><\/p>\n<p>[root&#064;web nginx]# bash ~\/nginx.sh<\/p>\n<p>tcp \u00a0 \u00a0 \u00a0 \u00a00 \u00a0 \u00a0 \u00a00 0.0.0.0:80 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00.0.0.0:* \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LISTEN \u00a0 \u00a0 \u00a017228\/nginx: master \u00a0<\/p>\n<p>nginx\u6b63\u5728\u6267\u884c&#xff0c;\u6216\u8005\u662f80\u7aef\u53e3\u88ab\u5360\u7528<\/p>\n<p>[root&#064;web nginx]# nginx -s stop<\/p>\n<p>[root&#064;web nginx]# bash ~\/nginx.sh<\/p>\n<p>\u4ee5systemctl\u63a7\u5236nginx \u00a0<\/p>\n<p>[root&#064;web nginx]# vim \/usr\/lib\/systemd\/system\/nginx.service<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"377\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180603-6805378b026ad.png\" width=\"556\" \/><\/p>\n<p>\u5982\u679c\u76f4\u63a5\u4f7f\u7528sbin\u76ee\u5f55\u4e0b\u7684nginx&#xff0c;\u5c31\u65e0\u6cd5\u4f7f\u7528systemctl \u00a0<\/p>\n<p>\u8fd9\u4e24\u5957\u547d\u4ee4\u53ea\u80fd\u7528\u4e00\u5957 \u00a0<\/p>\n<p>[root&#064;web nginx]# systemctl daemon-reload \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/p>\n<p>&#xff08;1&#xff09;[root&#064;web nginx]# systemctl stop nginx \u00a0<\/p>\n<p>&#xff08;2&#xff09;[root&#064;web nginx]# nginx -s reload \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0[root&#064;web nginx]# nginx -s stop \u00a0\u200b \u00a0<\/p>\n<p>\u6dfb\u52a0\u76d1\u63a7\u5757 \u00a0<\/p>\n<p>[root&#064;web nginx]# vim \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"115\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180603-6805378b2e745.png\" width=\"325\" \/><\/p>\n<p>[root&#064;web nginx]# systemctl restart nginx<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"170\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180603-6805378b53624.png\" width=\"569\" \/><\/p>\n<p>[root&#064;web ~]# wget https:\/\/nginx.org\/download\/nginx-1.26.1.tar.gz \u00a0<\/p>\n<p>[root&#064;web ~ ]# tar -zxvf nginx-1.26.1.tar.gz \u00a0 [root&#064;web ~]# yum -y install gcc gcc-c&#043;&#043; \u00a0[root&#064;web ~]# yum -y install openssl-devel pcre-devel make \u00a0<\/p>\n<p>[root&#064;web ~]# ls nginx-1.26.1 \u00a0nginx-1.26.1.tar.gz<\/p>\n<p>[root&#064;web ~]# cd nginx-1.26.1\/<\/p>\n<p>[root&#064;web nginx-1.26.1]# .\/configure &#8211;prefix&#061;\/usr\/local\/nginx &#8211;user&#061;nginx &#8211;group&#061;nginx &#8211;with-http_ssl_module &#8211;with-http_stub_status_module &#8211;with-http_realip_module &#8211;with-stream [root&#064;web nginx-1.26.1]# make &amp;&amp; make install \u00a0<\/p>\n<p>[root&#064;web nginx-1.26.1]# useradd -s \/bin\/nologin -M nginx \u00a0<\/p>\n<p>[root&#064;nginx nginx-1.26.1]# echo &#034;\u6211\u662f\u540e\u7aef\u670d\u52a1&#034; &gt; \/usr\/local\/nginx\/html\/index.html<\/p>\n<p>[root&#064;nginx nginx-1.26.1]# firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;80\/tcp &#8211;permanent\u00a0 \u00a0[root&#064;nginx nginx-1.26.1]# firewall-cmd &#8211;reload\u00a0<\/p>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 \u00a0<\/p>\n<p>[root&#064;nginx nginx-1.26.1]# vim \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"51\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180603-6805378b7b44a.png\" width=\"225\" \/><\/p>\n<p>\u5c06\u5176\u4fee\u6539\u4e3autf-8&#xff08;\u9632\u6b62\u51fa\u73b0\u4e71\u7801&#xff09;<\/p>\n<p>[root&#064;nginx nginx-1.26.1]# \/usr\/local\/nginx\/sbin\/nginx<\/p>\n<p>[root&#064;nginx nginx-1.26.1]# \/usr\/local\/nginx\/sbin\/nginx -s reload<\/p>\n<p>\u6d4f\u89c8\u5668\u8bbf\u95ee&#xff1a;192.168.2.27<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"138\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180603-6805378b9ef95.png\" width=\"579\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.8k\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf28\u6b21\u3002Web\uff1a\u4e3a\u2f64\u6237\u63d0\u4f9b\u7684\u2f00\u79cd\u5728\u4e92\u8054\u2f79\u4e0a\u6d4f\u89c8\u4fe1\u606f\u7684\u670d\u52a1\uff0cWeb \u670d\u52a1\u662f\u52a8\u6001\u7684\u3001\u53ef\u4ea4\u4e92\u7684\u3001\u8de8\u5e73\u53f0\u7684\u548c\u56fe\u5f62\u5316\u7684\u3002Web \u670d\u52a1\u4e3a\u2f64\u6237\u63d0\u4f9b\u5404\u79cd\u4e92\u8054\u2f79\u670d\u52a1\uff0c\u8fd9\u4e9b\u670d\u52a1\u5305\u62ec\u4fe1\u606f\u6d4f\u89c8\u670d\u52a1\uff0c\u4ee5\u53ca\u5404\u79cd\u4ea4\u4e92\u5f0f\u670d\u52a1\uff0c\u5305\u62ec\u804a\u5929\u3001\u8d2d\u7269\u3001\u5b66\u4e60\u7b49\u7b49\u5185\u5bb9\u3002Web \u5e94\u2f64\u5f00\u53d1\u4e5f\u7ecf\u8fc7\u4e86\u2f0f\u4ee3\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u2f6c\u524d Web \u5f00\u53d1\u4f9d \u7136\u662f\u6700\u91cd\u8981\u7684\u5f00\u53d1\u5185\u5bb9\u4e4b\u2f00\u3002_web\u914d\u7f6e<\/p>\n","protected":false},"author":2,"featured_media":30722,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58],"topic":[],"class_list":["post-30734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \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\/30734.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.8k\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf28\u6b21\u3002Web\uff1a\u4e3a\u2f64\u6237\u63d0\u4f9b\u7684\u2f00\u79cd\u5728\u4e92\u8054\u2f79\u4e0a\u6d4f\u89c8\u4fe1\u606f\u7684\u670d\u52a1\uff0cWeb \u670d\u52a1\u662f\u52a8\u6001\u7684\u3001\u53ef\u4ea4\u4e92\u7684\u3001\u8de8\u5e73\u53f0\u7684\u548c\u56fe\u5f62\u5316\u7684\u3002Web \u670d\u52a1\u4e3a\u2f64\u6237\u63d0\u4f9b\u5404\u79cd\u4e92\u8054\u2f79\u670d\u52a1\uff0c\u8fd9\u4e9b\u670d\u52a1\u5305\u62ec\u4fe1\u606f\u6d4f\u89c8\u670d\u52a1\uff0c\u4ee5\u53ca\u5404\u79cd\u4ea4\u4e92\u5f0f\u670d\u52a1\uff0c\u5305\u62ec\u804a\u5929\u3001\u8d2d\u7269\u3001\u5b66\u4e60\u7b49\u7b49\u5185\u5bb9\u3002Web \u5e94\u2f64\u5f00\u53d1\u4e5f\u7ecf\u8fc7\u4e86\u2f0f\u4ee3\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u2f6c\u524d Web \u5f00\u53d1\u4f9d \u7136\u662f\u6700\u91cd\u8981\u7684\u5f00\u53d1\u5185\u5bb9\u4e4b\u2f00\u3002_web\u914d\u7f6e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/30734.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-20T18:06:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180601-68053789aa69b.png\" \/>\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\/30734.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/30734.html\",\"name\":\"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T18:06:04+00:00\",\"dateModified\":\"2025-04-20T18:06:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/30734.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/30734.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30734.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09\"}]},{\"@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":"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \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\/30734.html","og_locale":"zh_CN","og_type":"article","og_title":"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.8k\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf28\u6b21\u3002Web\uff1a\u4e3a\u2f64\u6237\u63d0\u4f9b\u7684\u2f00\u79cd\u5728\u4e92\u8054\u2f79\u4e0a\u6d4f\u89c8\u4fe1\u606f\u7684\u670d\u52a1\uff0cWeb \u670d\u52a1\u662f\u52a8\u6001\u7684\u3001\u53ef\u4ea4\u4e92\u7684\u3001\u8de8\u5e73\u53f0\u7684\u548c\u56fe\u5f62\u5316\u7684\u3002Web \u670d\u52a1\u4e3a\u2f64\u6237\u63d0\u4f9b\u5404\u79cd\u4e92\u8054\u2f79\u670d\u52a1\uff0c\u8fd9\u4e9b\u670d\u52a1\u5305\u62ec\u4fe1\u606f\u6d4f\u89c8\u670d\u52a1\uff0c\u4ee5\u53ca\u5404\u79cd\u4ea4\u4e92\u5f0f\u670d\u52a1\uff0c\u5305\u62ec\u804a\u5929\u3001\u8d2d\u7269\u3001\u5b66\u4e60\u7b49\u7b49\u5185\u5bb9\u3002Web \u5e94\u2f64\u5f00\u53d1\u4e5f\u7ecf\u8fc7\u4e86\u2f0f\u4ee3\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u2f6c\u524d Web \u5f00\u53d1\u4f9d \u7136\u662f\u6700\u91cd\u8981\u7684\u5f00\u53d1\u5185\u5bb9\u4e4b\u2f00\u3002_web\u914d\u7f6e","og_url":"https:\/\/www.wsisp.com\/helps\/30734.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T18:06:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420180601-68053789aa69b.png"}],"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\/30734.html","url":"https:\/\/www.wsisp.com\/helps\/30734.html","name":"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T18:06:04+00:00","dateModified":"2025-04-20T18:06:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/30734.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/30734.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/30734.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"web\u670d\u52a1\u5668\u914d\u7f6e-\uff08apache+nginx\uff09"}]},{"@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\/30734","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=30734"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30734\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/30722"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=30734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=30734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=30734"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=30734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}