{"id":253958,"date":"2022-10-01T09:01:13","date_gmt":"2022-10-01T01:01:13","guid":{"rendered":"https:\/\/gulass.cn\/?p=253958"},"modified":"2022-09-28T11:01:43","modified_gmt":"2022-09-28T03:01:43","slug":"nginx-how-linux","status":"publish","type":"post","link":"https:\/\/gulass.cn\/nginx-how-linux.html","title":{"rendered":"Nginx\u5982\u4f55\u914d\u7f6e\u591a\u4e2a\u670d\u52a1\u57df\u540d\u89e3\u6790\u5171\u752880\u7aef\u53e3"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5bf9\u4e8eWeb\u800c\u5df2,80\u7aef\u53e3\u548c443\u7aef\u53e3\u662f\u5341\u5206\u91cd\u8981\u7684,\u4e0b\u9762\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e86\u5173\u4e8eNginx\u5982\u4f55\u914d\u7f6e\u591a\u4e2a\u670d\u52a1\u57df\u540d\u89e3\u6790\u5171\u752880\u7aef\u53e3\u7684\u76f8\u5173\u8d44\u6599,\u6587\u4e2d\u901a\u8fc7\u5b9e\u4f8b\u4ee3\u7801\u4ecb\u7ecd\u7684\u975e\u5e38\u8be6\u7ec6,\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u524d\u8a00<\/strong><\/div>\n \u7531\u4e8e\u516c\u53f8\u4e00\u53f0\u670d\u52a1\u5668\u540c\u65f6\u6709\u591a\u4e2a\u670d\u52a1\uff0c\u8fd9\u4e9b\u670d\u52a1\u901a\u8fc7\u57df\u540d\u89e3\u6790\u90fd\u5e0c\u671b\u76d1\u542c80\/443\u7aef\u53e3\u76f4\u63a5\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\uff0c\u6bd4\u5982\u6709demo.test.com\u548cproduct.test.com\u3002\u8fd9\u65f6\u5019\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528nginx\u7684\u4ee3\u7406\u8f6c\u53d1\u529f\u80fd\u5e2e\u6211\u4eec\u5b9e\u73b0\u5171\u752880\/443\u7aef\u53e3\u7684\u9700\u6c42\u3002<\/p>\n \u5907\u6ce8\uff1a\u7531\u4e8eHTTP\u534f\u8bae\u9ed8\u8ba4\u76d1\u542c80\u7aef\u53e3\uff0cHTTPS\u534f\u8bae\u9ed8\u8ba4\u76d1\u542c443\u7aef\u53e3\uff0c\u6240\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee80\/443\u7aef\u53e3\u7684\u670d\u52a1\u65f6\uff0c\u53ef\u4ee5\u5ffd\u7565\u57df\u540d\u540e\u7684\u201c :80\/:443\u201d \u7aef\u53e3\uff0c\u76f4\u63a5\u914d\u7f6e\u76d1\u542c\u523080\u7aef\u53e3\uff0c\u8bbf\u95ee\u6bd4\u8f83\u65b9\u4fbf\u3002<\/p>\n \u914d\u7f6enginx\u591a\u670d\u52a1\u5171\u752880\u7aef\u53e3<\/strong><\/div>\n \u9996\u5148\u627e\u5230nginx\u914d\u7f6e\u6587\u4ef6 <\/p>\n \u901a\u8fc7apt-get install nginx\u547d\u4ee4\u5b89\u88c5\u7684nginx\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u5b58\u653e\u5728\uff1a\/etc\/nginx\u76ee\u5f55\u4e0b\r\n \r\n\u5207\u6362\u5230\/etc\/nginx\u76ee\u5f55\r\n \r\n#cd \/etc\/nginx #\u5207\u6362\u5230nginx\u76ee\u5f55\r\n \r\n# ls #\u67e5\u770bnginx\u76ee\u5f55\u4e0b\u6587\u4ef6\r\nconf.d fastcgi_params koi-win modules-available nginx.conf scgi_params sites-enabled uwsgi_params fastcgi.conf koi-utf mime.types modules-enabled proxy_params sites-available snippets win-utf\r\n \r\n#vim nginx.conf #\u6253\u5f00nginx\u914d\u7f6e\u6587\u4ef6\uff08\u8f93\u5165shift+i\u63d2\u5165\u5185\u5bb9\uff0cesc\u9000\u51fa\u7f16\u8f91\uff0c\u70b9\u51fbshift+\uff1a\u8f93\u5165q\u9000\u51fa\u5f53\u524d\u9875\uff0cq\uff01\u5f3a\u5236\u9000\u51fa\uff0c\u4e0d\u4fdd\u5b58\u7f16\u8f91\u7684\u5185\u5bb9\uff1b\u8f93\u5165wq\uff01\u5f3a\u5236\u9000\u51fa\u5e76\u4fdd\u5b58\uff09<\/pre>\n |