當前的運行環境爲,PHP7.2.2以 FastCGI 模式運行,默認端口爲:9000,Nginx1.15.6php
打開nginx配置文件nginx
vi /usr/local/nginx/conf/nginx.conf
具體位置根據安裝狀況可能會有所差別spa
在 server{}代碼段裏新增如下代碼就能夠支持 php 的訪問了code
server{}
php
location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; }