整个文件就乱七八糟了,咋回事啊
##server {
Listen 80;
server_name www.zt. com;
root “D:\phpStudy\PHPTutorial\WWW\zt”;
位置 / {
index index.html index.htm index.php;
#autoindex on;
}
位置 ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
服务器{
Listen include fastcgi_params;
server_name ;
root "";
location / {
index index.html 索引。 htm index.php;
#autoindex on;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1: 9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
server {
听 fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
server_name fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
root " fastcgi_param PATH_INFO $fastcgi_path_inf";
位置/{
index index.html index.htm index.php;
#autoindex on;
}
位置 ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
服务器 {
听 fastcgi_split_path_info ^( (?U).+\.php)(/?.+)$;
server_name fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
root " fastcgi_param PATH_INFO $fastcgi_path_inf";
位置 / {
index index.html index.htm index.php;
#autoindex on;
}
位置 ~ \.php (.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)( /?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
包括 fastcgi_params;
}
}
你重启电脑的话,是不会向vhost文件写入任何东西的,你打开phpstudy的话软件会先读取识别vhsot文件的内容,按照固定的格式读取,你要是像自定义的话,请不要用用软件来配置vhost内容了,因为软件是傻瓜式的一键配置虚拟域名的!