{"id":58470,"date":"2025-08-16T11:05:06","date_gmt":"2025-08-16T03:05:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/58470.html"},"modified":"2025-08-16T11:05:06","modified_gmt":"2025-08-16T03:05:06","slug":"%e3%80%90%e8%bf%90%e7%bb%b4%e8%bf%9b%e9%98%b6%e3%80%91web-%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/58470.html","title":{"rendered":"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668"},"content":{"rendered":"<h3>WEB \u670d\u52a1\u5668<\/h3>\n<h4>WEB \u670d\u52a1\u5668\u7b80\u4ecb<\/h4>\n<p>Web \u670d\u52a1\u5668&#xff08;Web Server&#xff09;\u662f\u6307\u4e00\u79cd\u63a5\u6536\u5ba2\u6237\u7aef&#xff08;\u5982\u6d4f\u89c8\u5668&#xff09;\u53d1\u9001\u7684 HTTP \u8bf7\u6c42&#xff0c;\u5e76\u8fd4\u56de\u7f51\u9875\u5185\u5bb9\u6216\u8d44\u6e90\u7684\u7a0b\u5e8f\u6216\u8bbe\u5907\u3002\u5b83\u662f\u4e07\u7ef4\u7f51&#xff08;WWW&#xff09;\u7684\u6838\u5fc3\u7ec4\u6210\u90e8\u5206\u3002<\/p>\n<h5>Web \u670d\u52a1\u5668\u7684\u4e3b\u8981\u529f\u80fd<\/h5>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816030503-689ff55fc8392.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u5e38\u89c1web\u670d\u52a1\u5668<\/h4>\n<h5>Apache<\/h5>\n<p>Apache HTTP Server&#xff0c;\u975e\u6b63\u5f0f\u7684\u79f0\u547c Apache&#xff0c;\u662f\u4e16\u754c\u4e0a\u5e94\u7528\u6700\u5e7f\u6cdb\u7684WEB\u670d\u52a1\u5668\u3002<\/p>\n<p>\u5176\u4f18\u52bf\u5728\u4e8e&#xff0c;Apache\u4e00\u4e2a\u53ef\u6269\u5c55\u7684Web\u670d\u52a1\u5668&#xff0c;\u652f\u6301\u7684\u6a21\u5757\u975e\u5e38\u4e30\u5bcc\u3002<\/p>\n<p>Apache\u7684\u6e90\u4ee3\u7801\u662f\u5f00\u653e\u7684\u3001\u652f\u6301\u8de8\u5e73\u53f0\u5e94\u7528\u7b49\u3002<\/p>\n<p>Apache \u662f\u5c5e\u4e8e\u91cd\u91cf\u7ea7\u4ea7\u54c1&#xff0c;\u5728\u901f\u5ea6\u548c\u6027\u80fd\u4e0a\u4e0d\u53ca\u5176\u4ed6\u8f7b\u91cf\u7ea7WEB\u670d\u52a1\u5668&#xff0c;\u6240\u6d88\u8017\u7684\u5185\u5b58\u4e5f\u6bd4\u5176\u4ed6WEB\u670d\u52a1\u5668\u8981\u9ad8\u3002<\/p>\n<h5>Nginx<\/h5>\n<p>Nginx\u662f\u4e00\u6b3e\u9ad8\u6027\u80fd\u7684HTTP\u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u80fd\u591f\u9009\u62e9\u9ad8\u6548\u7684epoll\u3001kqueue\u3001eventport\u6700\u4e3a\u7f51\u7edcI\/O\u6a21\u578b&#xff0c;\u5728\u9ad8\u8fde\u63a5\u5e76\u53d1\u7684\u60c5\u51b5\u4e0b&#xff0c;\u80fd\u591f\u652f\u6301\u9ad8\u8fbe5\u4e07\u4e2a\u5e76\u53d1\u8fde\u63a5\u6570\u7684\u54cd\u5e94&#xff0c;\u800c\u5185\u5b58\u3001CPU\u7b49\u7cfb\u7edf\u8d44\u6e90\u6d88\u8017\u5374\u975e\u5e38\u4f4e&#xff0c;\u8fd0\u884c\u975e\u5e38\u7a33\u5b9a\u3002<\/p>\n<h5>Lighttpd<\/h5>\n<p>Lighttpd\u63d0\u4f9b\u4e00\u4e2a\u4e13\u95e8\u9488\u5bf9\u9ad8\u6027\u80fd\u7f51\u7ad9&#xff0c;\u5b89\u5168\u3001\u5feb\u901f\u3001\u517c\u5bb9\u6027\u597d\u5e76\u4e14\u7075\u6d3b\u7684WEB  Server\u73af\u5883&#xff0c;\u5b83\u5177\u6709\u5185\u5b58\u5f00\u9500\u4f4e\u3001CPU\u5360\u6709\u7387\u4f4e\u3001\u6548\u80fd\u597d&#xff0c;\u4ee5\u53ca\u6a21\u5757\u4e30\u5bcc\u7b49\u7279\u70b9\u3002\u652f\u6301FastCGI\u3001CGI\u3001Auth\u3001\u8f93\u51fa\u538b\u7f29\u3001URL\u91cd\u5199\u53caAlias\u7b49\u91cd\u8981\u529f\u80fd&#xff0c;\u5c5e\u4e8e\u8f7b\u91cf\u7ea7WEB\u670d\u52a1\u5668\u3002<\/p>\n<h5>Tomcat<\/h5>\n<p>Tomcat \u662f\u4e00\u4e2a\u5f00\u653e\u6e90\u4ee3\u7801\u3001\u8fd0\u884cservlet\u548cJSP Web\u5e94\u7528\u8f6f\u4ef6\u7684\u57fa\u4e8eJava\u7684web\u5e94\u7528\u8f6f\u4ef6\u5bb9\u5668\u3002Tomcat server \u662f\u6839\u636eservlet\u548cjsp\u89c4\u8303\u6267\u884c\u7684&#xff0c;\u56e0\u6b64\u4e5f\u53ef\u4ee5\u8bf4Tomcat server\u5b9e\u884c\u4e86Apache-Jakarta\u89c4\u8303&#xff0c;\u4e14\u6bd4\u7edd\u5927\u591a\u6570\u5546\u7528\u5e94\u7528\u8f6f\u4ef6\u670d\u52a1\u5668\u8981\u597d\u3002tomcat\u5bf9\u9759\u6001\u6587\u4ef6\u548c\u9ad8\u5e76\u53d1\u7684\u5904\u7406\u6bd4\u8f83\u5f31\u3002<\/p>\n<h5>IIS<\/h5>\n<p>Microsoft\u7684Web\u670d\u52a1\u5668\u4ea7\u54c1\u4e3a Internet Information Server (IIS)&#xff0c; IIS \u662f\u5141\u8bb8\u5728\u516c\u5171Intranet\u6216Internet\u4e0a\u53d1\u5e03\u4fe1\u606f\u7684Web\u670d\u52a1\u5668\u3002IIS\u662f\u76ee\u524d\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4ea7\u54c1\u4e4b\u4e00&#xff0c;\u5f88\u591a\u8457\u540d\u7684\u7f51\u7ad9\u90fd\u662f\u5efa\u7acb\u5728IIS\u7684\u5e73\u53f0\u4e0a\u3002IIS\u63d0\u4f9b\u4e86\u4e00\u4e2a\u56fe\u5f62\u754c\u9762\u7684\u7ba1\u7406\u5de5\u5177&#xff0c;\u79f0\u4e3a Internet\u670d\u52a1\u7ba1\u7406\u5668&#xff0c;\u53ef\u7528\u4e8e\u76d1\u89c6\u914d\u7f6e\u548c\u63a7\u5236Internet\u670d\u52a1\u3002<\/p>\n<p>IIS\u662f\u4e00\u79cdWeb\u670d\u52a1\u7ec4\u4ef6&#xff0c;\u5176\u4e2d\u5305\u62ecWeb\u670d\u52a1\u5668\u3001FTP\u670d\u52a1\u5668\u3001NNTP\u670d\u52a1\u5668\u548cSMTP\u670d\u52a1\u5668&#xff0c;\u5206\u522b\u7528\u4e8e\u7f51\u9875\u6d4f\u89c8\u3001\u6587\u4ef6\u4f20\u8f93\u3001\u65b0\u95fb\u670d\u52a1\u548c\u90ae\u4ef6\u53d1\u9001\u7b49\u65b9\u9762&#xff0c;\u5b83\u4f7f\u5f97\u5728\u7f51\u7edc(\u5305\u62ec\u4e92\u8054\u7f51\u548c\u5c40\u57df\u7f51)\u4e0a\u53d1\u5e03\u4fe1\u606f\u6210\u4e86\u4e00\u4ef6\u5f88\u5bb9\u6613\u7684\u4e8b\u3002\u5b83\u63d0\u4f9bISAPI(IntranetServer API)\u4f5c\u4e3a\u6269\u5c55Web\u670d\u52a1\u5668\u529f\u80fd\u7684\u7f16\u7a0b\u63a5\u53e3&#xff1b;\u540c\u65f6\u5b83\u8fd8\u63d0\u4f9b\u4e00\u4e2aInternet\u6570\u636e\u5e93\u8fde\u63a5\u5668&#xff0c;\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u6570\u636e\u5e93\u7684\u67e5\u8be2\u548c\u66f4\u65b0\u3002<\/p>\n<h4>Nginx<\/h4>\n<p>Nginx\u662f\u4e00\u6b3e\u9ad8\u6027\u80fd\u7684HTTP\u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668&#xff0c;\u80fd\u591f\u9009\u62e9\u9ad8\u6548\u7684epoll\u3001kqueue\u3001eventport\u6700\u4e3a\u7f51\u7edcI\/O\u6a21\u578b&#xff0c;\u5728\u9ad8\u8fde\u63a5\u5e76\u53d1\u7684\u60c5\u51b5\u4e0b&#xff0c;\u80fd\u591f\u652f\u6301\u9ad8\u8fbe5\u4e07\u4e2a\u5e76\u53d1\u8fde\u63a5\u6570\u7684\u54cd\u5e94&#xff0c;\u800c\u5185\u5b58\u3001CPU\u7b49\u7cfb\u7edf\u8d44\u6e90\u6d88\u8017\u5374\u975e\u5e38\u4f4e&#xff0c;\u8fd0\u884c\u975e\u5e38\u7a33\u5b9a\u3002<\/p>\n<h5>\u5b89\u88c5 nginx<\/h5>\n<p><span class=\"token comment\"># \u5b89\u88c5 nginx<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:10:50<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y nginx<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8 nginx<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:11:03<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable nginx &#8211;now<\/span><br \/>\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/nginx.service to \/usr\/lib\/systemd\/system\/nginx.service.<\/p>\n<p><span class=\"token comment\"># \u51c6\u5907\u4e3b\u9875<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:12:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mv \/usr\/share\/nginx\/html\/index.html{,.ori}<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:13:13<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo Hello World From Nginx &gt; \/usr\/share\/nginx\/html\/index.html<\/span><\/p>\n<p><span class=\"token comment\"># \u9632\u706b\u5899(\u5982\u679c\u672a\u542f\u7528\u5c31\u4e0d\u7528\u505a)<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:13:16<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;add-service&#061;http &#8211;permanent<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:13:19<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;reload<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/www.xiexin.cloud<\/span><br \/>\n<span class=\"token comment\"># windows\u5ba2\u6237\u7aef\u4fee\u6539C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts<\/span><br \/>\n<span class=\"token comment\"># Linux\u6216Unix\u4fee\u6539 \/etc\/hosts<\/span><br \/>\n<span class=\"token comment\"># \u6dfb\u52a0\u5982\u4e0b\u8bb0\u5f55<\/span><br \/>\n<span class=\"token number\">10.1<\/span>.8.10 www.xiexin.cloud<\/p>\n<h5>\u865a\u62df\u4e3b\u673a<\/h5>\n<p>\u540c\u4e00\u4e2aweb\u670d\u52a1\u5668\u63d0\u4f9b\u591a\u4e2a\u7ad9\u70b9\u3002<\/p>\n<h6>\u6839\u636e\u540d\u79f0<\/h6>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:13:22<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/conf.d\/vhost-name.conf<\/span><\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n    server_name  web1.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n    root         \/usr\/share\/nginx\/web1<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n    server_name  web2.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n    root         \/usr\/share\/nginx\/web2<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h6>\u6839\u636e port<\/h6>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:19:17<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/conf.d\/vhost-port.conf<\/span><\/p>\n<p>server <span class=\"token punctuation\">{<\/span><br \/>\n    listen       <span class=\"token number\">8081<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    server_name  www.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n    root         \/usr\/share\/nginx\/8081<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n    listen       <span class=\"token number\">8082<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    server_name  www.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n    root         \/usr\/share\/nginx\/8082<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>\u914d\u7f6eSSL\/TLS<\/h5>\n<h6>\u751f\u6210\u8bc1\u4e66<\/h6>\n<p><span class=\"token comment\">#&#8211;1&#8211;\u751f\u6210\u79c1\u94a5 <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:19:26<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># openssl genrsa -out www.key 2048  <\/span><br \/>\nGenerating RSA private key, <span class=\"token number\">2048<\/span> bit long modulus<br \/>\n<span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span>&#043;&#043;&#043;<br \/>\n<span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span>&#043;&#043;&#043;<br \/>\ne is <span class=\"token number\">65537<\/span> <span class=\"token punctuation\">(<\/span>0x10001<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\">#&#8211;2&#8211;\u751f\u6210\u8bf7\u6c42\u6587\u4ef6csr<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:20:54<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># openssl req -new -key www.key -out www.csr -subj &#034;\/C&#061;CN\/ST&#061;JS\/L&#061;NJ\/O&#061;LM\/OU&#061;DEVOPS\/CN&#061;www.xiexin.cloud\/emailAddress&#061;xiexin&#064;xiexin.cloud&#034; <\/span><br \/>\n<span class=\"token comment\">#CN\u7684\u503c\u5fc5\u987b\u662f\u7f51\u7ad9\u57df\u540d  <\/span><\/p>\n<p><span class=\"token comment\">#&#8211;3&#8211;\u4f7f\u7528\u81ea\u5df1\u7684\u79c1\u94a5\u5bf9\u8bf7\u6c42\u6587\u4ef6\u7b7e\u540d&#xff0c;\u4ee5\u751f\u6210\u8bc1\u4e66 <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:21:51<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># openssl x509 -req -days 3650 -in www.csr -signkey www.key -out www.crt<\/span><br \/>\nSignature ok<br \/>\n<span class=\"token assign-left variable\">subject<\/span><span class=\"token operator\">&#061;<\/span>\/C<span class=\"token operator\">&#061;<\/span>CN\/ST<span class=\"token operator\">&#061;<\/span>JS\/L<span class=\"token operator\">&#061;<\/span>NJ\/O<span class=\"token operator\">&#061;<\/span>LM\/OU<span class=\"token operator\">&#061;<\/span>DEVOPS\/CN<span class=\"token operator\">&#061;<\/span>www.xiexin.cloud\/emailAddress<span class=\"token operator\">&#061;<\/span>xiexin&#064;xiexin.cloud<br \/>\nGetting Private key<\/p>\n<h6>\u914d\u7f6e\u7ad9\u70b9<\/h6>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:22:21<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir \/etc\/ssl\/certs\/www.xiexin.cloud<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:23:05<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mv www* \/etc\/ssl\/certs\/www.xiexin.cloud<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:23:18<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/conf.d\/ssl.conf<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n    listen       <span class=\"token number\">443<\/span> ssl http2 default_server<span class=\"token punctuation\">;<\/span><br \/>\n    listen       <span class=\"token punctuation\">[<\/span>::<span class=\"token punctuation\">]<\/span>:443 ssl http2 default_server<span class=\"token punctuation\">;<\/span><br \/>\n    server_name  www.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n    root         \/usr\/share\/nginx\/html<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\"># \u8bc1\u4e66<\/span><br \/>\n    ssl_certificate <span class=\"token string\">&#034;\/etc\/ssl\/certs\/www.xiexin.cloud\/www.crt&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\"># \u79c1\u94a5<\/span><br \/>\n    ssl_certificate_key <span class=\"token string\">&#034;\/etc\/ssl\/certs\/www.xiexin.cloud\/www.key&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:25:01<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl restart nginx<\/span><\/p>\n<p><span class=\"token comment\"># \u914d\u7f6eHTTP\u91cd\u5b9a\u5411\u5230https.<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:25:04<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/nginx.conf<\/span><br \/>\n   server <span class=\"token punctuation\">{<\/span><br \/>\n        listen       <span class=\"token number\">80<\/span> default_server<span class=\"token punctuation\">;<\/span><br \/>\n        listen       <span class=\"token punctuation\">[<\/span>::<span class=\"token punctuation\">]<\/span>:80 default_server<span class=\"token punctuation\">;<\/span><br \/>\n        server_name  www.xiexin.cloud<span class=\"token punctuation\">;<\/span><br \/>\n        root         \/usr\/share\/nginx\/html<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\"># \u6dfb\u52a0 \u91cd\u5b9a\u5411<\/span><br \/>\n        <span class=\"token builtin class-name\">return<\/span>       <span class=\"token number\">301<\/span> https:\/\/<span class=\"token variable\">$host<\/span><span class=\"token variable\">$request_uri<\/span><span class=\"token punctuation\">;<\/span><br \/>\n   <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:27:35<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl restart nginx<\/span><\/p>\n<p><span class=\"token comment\"># \u9632\u706b\u5899\u8bbe\u7f6e(\u9632\u706b\u5899\u4e00\u822c\u9ed8\u8ba4\u4e0d\u5f00)<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;www ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;add-service&#061;https &#8211;permanent<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;www ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># firewall-cmd &#8211;reload<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">21<\/span>:28:50<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/www.xiexin.cloud\/<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">21<\/span>:28:57<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl -k https:\/\/www.xiexin.cloud\/<\/span><\/p>\n<h5>\u914d\u7f6e\u57fa\u672c\u8ba4\u8bc1<\/h5>\n<p>\u7528\u6237\u540d\u548c\u5bc6\u7801\u4f7f\u7528plain text\u53d1\u9001&#xff0c;\u6240\u4ee5\u6700\u597d\u914d\u7f6eSSL\/TLS\u3002<\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5\u5de5\u5177<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:27:47<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum -y install httpd-tools<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:35:34<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/nginx\/conf.d\/ssl.conf<\/span><br \/>\nserver <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token punctuation\">..<\/span><span class=\"token punctuation\">..<\/span>.<br \/>\n    location \/auth-basic\/ <span class=\"token punctuation\">{<\/span><br \/>\n        auth_basic            <span class=\"token string\">&#034;Basic Auth&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        auth_basic_user_file  <span class=\"token string\">&#034;\/etc\/nginx\/.htpasswd&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:36:17<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl restart nginx<\/span><\/p>\n<p><span class=\"token comment\"># add user for Basic authentication<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:36:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># htpasswd -c \/etc\/nginx\/.htpasswd xiexin<\/span><br \/>\nNew password:<br \/>\nRe-type new password:<br \/>\nAdding password <span class=\"token keyword\">for<\/span> user xiexin<\/p>\n<p><span class=\"token comment\"># create a test page<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:37:45<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir \/usr\/share\/nginx\/html\/auth-basic<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:38:23<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/usr\/share\/nginx\/html\/auth-basic\/index.html<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>html<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>div <span class=\"token assign-left variable\">style<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;width: 100%; font-size: 40px; font-weight: bold; text-align: xiexiner;&#034;<\/span><span class=\"token operator\">&gt;<\/span><br \/>\nTest Page <span class=\"token keyword\">for<\/span> Basic Authentication<br \/>\n<span class=\"token operator\">&lt;<\/span>\/div<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/html<span class=\"token operator\">&gt;<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">21<\/span>:40:15<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/www.xiexin.cloud\/auth-basic\/<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>html<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>div <span class=\"token assign-left variable\">style<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;width: 100%; font-size: 40px; font-weight: bold; text-align: xiexiner;&#034;<\/span><span class=\"token operator\">&gt;<\/span><br \/>\nTest Page <span class=\"token keyword\">for<\/span> Basic Authentication<br \/>\n<span class=\"token operator\">&lt;<\/span>\/div<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/html<span class=\"token operator\">&gt;<\/span><\/p>\n<h5>\u652f\u6301\u52a8\u6001\u811a\u672c<\/h5>\n<h6>\u4f7f\u7528 PHP<\/h6>\n<p><span class=\"token comment\"># \u5b89\u88c5PHP\u548cphp-fpm&#xff0c;\u5efa\u8bae\u628a\u5176\u4ed6\u7684\u6269\u5c55\u5305\u4e00\u8d77\u5b89\u88c5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:39:10<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y php php-fpm<\/span><\/p>\n<p><span class=\"token comment\"># \u5efa\u8bae\u628a\u5176\u4ed6\u7684\u6269\u5c55\u5305\u4e00\u8d77\u5b89\u88c5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:42:22<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y php-gd php-common php-pear php-mbstring php-mcrypt<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b php \u7248\u672c<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:43:31<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># php -v<\/span><br \/>\nPHP <span class=\"token number\">5.4<\/span>.16 <span class=\"token punctuation\">(<\/span>cli<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">(<\/span>built: Apr  <span class=\"token number\">1<\/span> <span class=\"token number\">2020<\/span> 04:07:17<span class=\"token punctuation\">)<\/span><br \/>\nCopyright <span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span> <span class=\"token number\">1997<\/span>-2013 The PHP Group<br \/>\nZend Engine v2.4.0, Copyright <span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span> <span class=\"token number\">1998<\/span>-2013 Zend Technologies<\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5 php \u662f\u5426\u6b63\u5e38<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:44:04<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo &#034;&lt;?php echo &#039;PHP Test Page&#039;.\\\\&#034;\\\\n\\\\&#034;; ?&gt;&#034; &gt; php_test.php <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:44:40<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># php php_test.php <\/span><br \/>\nPHP Test Page<\/p>\n<p><span class=\"token comment\"># \u51c6\u5907\u6d4b\u8bd5\u9875&#xff0c;\u4f7f\u7528phpinfo\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:44:45<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo &#034;&lt;?php phpinfo(); ?&gt;&#034; &gt; \/usr\/share\/nginx\/html\/info.php<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/www.xiexin.cloud\/info.php<\/span><\/p>\n<h4>Tomcat<\/h4>\n<p>Apache Tomcat \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 Java Servlet \u5bb9\u5668\u548c Web \u670d\u52a1\u5668&#xff0c;\u5e38\u7528\u4e8e\u90e8\u7f72 Java Web \u5e94\u7528\u3002\u5b83\u5b9e\u73b0\u4e86 Java EE \u4e2d\u7684 Servlet\u3001JSP \u7b49\u89c4\u8303\u3002<\/p>\n<h5>\u4e3b\u8981\u7279\u70b9<\/h5>\n<ul>\n<li>\n<p>Servlet \u5bb9\u5668&#xff1a;\u652f\u6301\u8fd0\u884c\u57fa\u4e8e Servlet \u6280\u672f\u7684 Java Web \u5e94\u7528\u3002<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301 JSP&#xff1a;\u53ef\u4ee5\u7f16\u8bd1\u548c\u8fd0\u884c JSP \u9875\u9762\u3002<\/p>\n<\/li>\n<li>\n<p>\u8f7b\u91cf\u7ea7&#xff1a;\u76f8\u6bd4\u5b8c\u6574\u7684 Java EE \u670d\u52a1\u5668&#xff08;\u5982 JBoss\u3001WebLogic&#xff09;&#xff0c;Tomcat \u66f4\u8f7b\u4fbf&#xff0c;\u9002\u5408\u4e2d\u5c0f\u578b Web \u9879\u76ee\u3002<\/p>\n<\/li>\n<li>\n<p>\u5f00\u6e90\u514d\u8d39&#xff1a;\u7531 Apache \u8f6f\u4ef6\u57fa\u91d1\u4f1a\u7ef4\u62a4\u3002<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u7075\u6d3b&#xff1a;\u901a\u8fc7 XML \u914d\u7f6e\u6587\u4ef6&#xff08;\u5982 server.xml\u3001context.xml&#xff09;\u8fdb\u884c\u7ba1\u7406\u3002<\/p>\n<\/li>\n<\/ul>\n<h5>Tomcat \u90e8\u7f72<\/h5>\n<p><span class=\"token comment\"># \u5b89\u88c5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:49:44<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y tomcat<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u7248\u672c<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:50:19<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># java -version<\/span><br \/>\nopenjdk version <span class=\"token string\">&#034;1.8.0_412&#034;<\/span><br \/>\nOpenJDK Runtime Environment <span class=\"token punctuation\">(<\/span>build <span class=\"token number\">1.8<\/span>.0_412-b08<span class=\"token punctuation\">)<\/span><br \/>\nOpenJDK <span class=\"token number\">64<\/span>-Bit Server VM <span class=\"token punctuation\">(<\/span>build <span class=\"token number\">25.412<\/span>-b08, mixed mode<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8tomcat<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:51:34<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable &#8211;now tomcat.service<\/span><br \/>\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/tomcat.service to \/usr\/lib\/systemd\/system\/tomcat.service.<\/p>\n<p><span class=\"token comment\"># \u51c6\u5907\u6d4b\u8bd5\u9875\u9762<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:51:53<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cd \/var\/lib\/tomcat\/webapps\/<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server webapps <span class=\"token number\">21<\/span>:52:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir test<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server webapps <span class=\"token number\">21<\/span>:52:16<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim test\/index.jsp<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>html<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>head<span class=\"token operator\">&gt;<\/span><br \/>\n            <span class=\"token operator\">&lt;<\/span>title<span class=\"token operator\">&gt;<\/span>\u7b2c\u4e00\u4e2a JSP \u7a0b\u5e8f<span class=\"token operator\">&lt;<\/span>\/title<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>\/head<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n            <span class=\"token operator\">&lt;<\/span>%<br \/>\n                   out.println<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Hello World!&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            %<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>\/body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/html<span class=\"token operator\">&gt;<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">21<\/span>:54:57<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># curl http:\/\/www.xiexin.cloud:8080\/test\/index.jsp<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>html<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>head<span class=\"token operator\">&gt;<\/span><br \/>\n            <span class=\"token operator\">&lt;<\/span>title<span class=\"token operator\">&gt;<\/span>\u7b2c\u4e00\u4e2a JSP \u7a0b\u5e8f<span class=\"token operator\">&lt;<\/span>\/title<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>\/head<span class=\"token operator\">&gt;<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>body<span class=\"token operator\">&gt;<\/span><br \/>\n            Hello World<span class=\"token operator\">!<\/span><br \/>\n     <span class=\"token operator\">&lt;<\/span>\/body<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token operator\">&lt;<\/span>\/html<span class=\"token operator\">&gt;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb897\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Web\u670d\u52a1\u5668\u7684\u57fa\u672c\u6982\u5ff5\u548c\u4e3b\u8981\u529f\u80fd\uff0c\u91cd\u70b9\u5206\u6790\u4e86\u4e94\u79cd\u5e38\u89c1Web\u670d\u52a1\u5668\uff08Apache\u3001Nginx\u3001Lighttpd\u3001Tomcat\u3001IIS\uff09\u7684\u7279\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5176\u4e2d\u8be6\u7ec6\u8bb2\u89e3\u4e86Nginx\u670d\u52a1\u5668\u7684\u5b89\u88c5\u914d\u7f6e\u8fc7\u7a0b\uff0c\u5305\u62ec\u865a\u62df\u4e3b\u673a\u8bbe\u7f6e\uff08\u57fa\u4e8e\u540d\u79f0\u548c\u7aef\u53e3\uff09\u3001SSL\/TLS\u8bc1\u4e66\u751f\u6210\u4e0e\u914d\u7f6e\uff08\u5b9e\u73b0HTTPS\u8bbf\u95ee\uff09\u3001HTTP\u91cd\u5b9a\u5411\u5230HTTPS\uff0c\u4ee5\u53ca\u57fa\u672c\u8ba4\u8bc1\u914d\u7f6e\u7b49\u5185\u5bb9\u3002\u6587\u7ae0\u901a\u8fc7\u5177\u4f53\u547d\u4ee4\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u5b89\u5168\u3001\u9ad8\u6548\u7684Web\u670d\u52a1\u5668\u73af\u5883\uff0c\u7279\u522b\u5f3a\u8c03\u4e86Nginx\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\u7684\u6027\u80fd\u4f18\u52bf\u53ca\u5176\u4f4e\u8d44\u6e90\u6d88\u8017\u7684\u7279\u70b9\u3002\u8fd9\u4e9b\u914d\u7f6e\u65b9\u6cd5\u4e3a\u6784\u5efa\u73b0\u4ee3\u5316We<\/p>\n","protected":false},"author":2,"featured_media":58469,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[87,43,44],"topic":[],"class_list":["post-58470","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-87","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \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\/58470.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb897\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Web\u670d\u52a1\u5668\u7684\u57fa\u672c\u6982\u5ff5\u548c\u4e3b\u8981\u529f\u80fd\uff0c\u91cd\u70b9\u5206\u6790\u4e86\u4e94\u79cd\u5e38\u89c1Web\u670d\u52a1\u5668\uff08Apache\u3001Nginx\u3001Lighttpd\u3001Tomcat\u3001IIS\uff09\u7684\u7279\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5176\u4e2d\u8be6\u7ec6\u8bb2\u89e3\u4e86Nginx\u670d\u52a1\u5668\u7684\u5b89\u88c5\u914d\u7f6e\u8fc7\u7a0b\uff0c\u5305\u62ec\u865a\u62df\u4e3b\u673a\u8bbe\u7f6e\uff08\u57fa\u4e8e\u540d\u79f0\u548c\u7aef\u53e3\uff09\u3001SSL\/TLS\u8bc1\u4e66\u751f\u6210\u4e0e\u914d\u7f6e\uff08\u5b9e\u73b0HTTPS\u8bbf\u95ee\uff09\u3001HTTP\u91cd\u5b9a\u5411\u5230HTTPS\uff0c\u4ee5\u53ca\u57fa\u672c\u8ba4\u8bc1\u914d\u7f6e\u7b49\u5185\u5bb9\u3002\u6587\u7ae0\u901a\u8fc7\u5177\u4f53\u547d\u4ee4\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u5b89\u5168\u3001\u9ad8\u6548\u7684Web\u670d\u52a1\u5668\u73af\u5883\uff0c\u7279\u522b\u5f3a\u8c03\u4e86Nginx\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\u7684\u6027\u80fd\u4f18\u52bf\u53ca\u5176\u4f4e\u8d44\u6e90\u6d88\u8017\u7684\u7279\u70b9\u3002\u8fd9\u4e9b\u914d\u7f6e\u65b9\u6cd5\u4e3a\u6784\u5efa\u73b0\u4ee3\u5316We\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/58470.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-16T03:05:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816030503-689ff55fc8392.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\/58470.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/58470.html\",\"name\":\"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-16T03:05:06+00:00\",\"dateModified\":\"2025-08-16T03:05:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/58470.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/58470.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/58470.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668\"}]},{\"@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":"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \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\/58470.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb897\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Web\u670d\u52a1\u5668\u7684\u57fa\u672c\u6982\u5ff5\u548c\u4e3b\u8981\u529f\u80fd\uff0c\u91cd\u70b9\u5206\u6790\u4e86\u4e94\u79cd\u5e38\u89c1Web\u670d\u52a1\u5668\uff08Apache\u3001Nginx\u3001Lighttpd\u3001Tomcat\u3001IIS\uff09\u7684\u7279\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5176\u4e2d\u8be6\u7ec6\u8bb2\u89e3\u4e86Nginx\u670d\u52a1\u5668\u7684\u5b89\u88c5\u914d\u7f6e\u8fc7\u7a0b\uff0c\u5305\u62ec\u865a\u62df\u4e3b\u673a\u8bbe\u7f6e\uff08\u57fa\u4e8e\u540d\u79f0\u548c\u7aef\u53e3\uff09\u3001SSL\/TLS\u8bc1\u4e66\u751f\u6210\u4e0e\u914d\u7f6e\uff08\u5b9e\u73b0HTTPS\u8bbf\u95ee\uff09\u3001HTTP\u91cd\u5b9a\u5411\u5230HTTPS\uff0c\u4ee5\u53ca\u57fa\u672c\u8ba4\u8bc1\u914d\u7f6e\u7b49\u5185\u5bb9\u3002\u6587\u7ae0\u901a\u8fc7\u5177\u4f53\u547d\u4ee4\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u5b89\u5168\u3001\u9ad8\u6548\u7684Web\u670d\u52a1\u5668\u73af\u5883\uff0c\u7279\u522b\u5f3a\u8c03\u4e86Nginx\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\u7684\u6027\u80fd\u4f18\u52bf\u53ca\u5176\u4f4e\u8d44\u6e90\u6d88\u8017\u7684\u7279\u70b9\u3002\u8fd9\u4e9b\u914d\u7f6e\u65b9\u6cd5\u4e3a\u6784\u5efa\u73b0\u4ee3\u5316We","og_url":"https:\/\/www.wsisp.com\/helps\/58470.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-16T03:05:06+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816030503-689ff55fc8392.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\/58470.html","url":"https:\/\/www.wsisp.com\/helps\/58470.html","name":"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-16T03:05:06+00:00","dateModified":"2025-08-16T03:05:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/58470.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/58470.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/58470.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u8fd0\u7ef4\u8fdb\u9636\u3011WEB \u670d\u52a1\u5668"}]},{"@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\/58470","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=58470"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/58470\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/58469"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=58470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=58470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=58470"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=58470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}