#其他我也没动,小白一个 #注意的是root 路径设置好,以后PHP项目就放到这里了 #location 照着复制过去就行 = = #9090端口是我谁便取的 #127.0.0.1:9000这里有些讲究,端口和php-fpm.conf中的监听端口保持#一致,若没改conf配置,默认还是9000 #location正则和fastcgi_split_path_info 需要注意配置对 server{ listen 9090; root /data/www; location / { index index.php index.html index.htm; } location ~ .+\.php($|/) { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
原文:https://www.cnblogs.com/wslio/p/11649697.html