{"id":228497,"date":"2021-10-24T08:13:12","date_gmt":"2021-10-24T00:13:12","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=228497"},"modified":"2021-10-19T09:11:43","modified_gmt":"2021-10-19T01:11:43","slug":"nginx-support-php","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/nginx-support-php.html","title":{"rendered":"\u4ecb\u7ecdNginx\u914d\u7f6e\u652f\u6301PHP"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | PHP\uff08PHP: Hypertext Preprocessor\uff09\u5373\u201c\u8d85\u6587\u672c\u9884\u5904\u7406\u5668\u201d\uff0c\u662f\u5728\u670d\u52a1\u5668\u7aef\u6267\u884c\u7684\u811a\u672c\u8bed\u8a00\uff0c\u5c24\u5176\u9002\u7528\u4e8eWeb\u5f00\u53d1\u5e76\u53ef\u5d4c\u5165HTML\u4e2d\u3002PHP\u8bed\u6cd5\u5b66\u4e60\u4e86C\u8bed\u8a00\uff0c\u5438\u7eb3Java\u548cPerl\u591a\u4e2a\u8bed\u8a00\u7684\u7279\u8272\u53d1\u5c55\u51fa\u81ea\u5df1\u7684\u7279\u8272\u8bed\u6cd5\uff0c\u5e76\u6839\u636e\u5b83\u4eec\u7684\u957f\u9879\u6301\u7eed\u6539\u8fdb\u63d0\u5347\u81ea\u5df1\uff0c\u4f8b\u5982java\u7684\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff0c\u8be5\u8bed\u8a00\u5f53\u521d\u521b\u5efa\u7684\u4e3b\u8981\u76ee\u6807\u662f\u8ba9\u5f00\u53d1\u4eba\u5458\u5feb\u901f\u7f16\u5199\u51fa\u4f18\u8d28\u7684web\u7f51\u7ad9\u3002 [1-2] PHP\u540c\u65f6\u652f\u6301\u9762\u5411\u5bf9\u8c61\u548c\u9762\u5411\u8fc7\u7a0b\u7684\u5f00\u53d1\uff0c\u4f7f\u7528\u4e0a\u975e\u5e38\u7075\u6d3b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n 1\u3001\u6dfb\u52a0 Nginx \u914d\u7f6e<\/strong><\/span><\/div>\n \r\n[root@qfedu.com php-fpm.d]#cd \/etc\/nginx\r\n[root@qfedu.com conf]# vim nginx.conf\r\n#\u914d\u7f6e\u5982\u4e0b\r\nserver\r\n{\r\nlisten 80;\r\nserver_name localhost;\r\nindex index.html index.htm index.php;\r\nroot \/usr\/local\/nginx\/html;\r\nlocation ~ \\.php$\r\n{\r\ninclude fastcgi_params;\r\nfastcgi_pass 127.0.0.1:9000;\r\nfastcgi_index index.php;\r\nfastcgi_param SCRIPT_FILENAME \/usr\/local\/nginx\/html$fastcgi_script_name;\r\n}\r\n}<\/pre>\n |