我的nginx配置文件怎么和老師的不一樣?
? ?#PHP 腳本請求全部轉發到 FastCGI處理. 使用FastCGI默認配置.
??? location ~ \.php$ {
??????? root /root;
??????? fastcgi_pass 127.0.0.1:9000;
??????? fastcgi_index index.php;
??????? fastcgi_param SCRIPT_FILENAME /home/www/www$fastcgi_script_name;
??????? include fastcgi_params;
2016-10-14
server { ????listen???????80; ????server_name??localhost; ????index?index.html?index.htm?index.php; ????root?/var/www/html; ????location?~?[^/]\.php(/|$) ????{ ?????????fastcgi_pass?127.0.0.1:9000; ?????????fastcgi_index??index.php; ?????????fastcgi_split_path_info?^(.+?\.php)(/.*)$;?????#增加這一句 ?????????fastcgi_param?PATH_INFO?$fastcgi_path_info;????#增加這一句 ?????????fastcgi_param??SCRIPT_FILENAME??$document_root$fastcgi_script_name; ?????????include????????fastcgi_params; ????} }