window下配置虚拟主机时:
server {
listen 80;
server_name test;
location / {
root D:/test;
index index.html index.htm index.php;
autoindex on;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME D:/test$fastcgi_script_name;
include fastcgi_params;
}
}
中的:
D:\test 必须写成D:/test,查看错误日志:
2011/12/21 13:17:30 [crit] 4864#1720: *102 CreateFile() "D: est/favicon.ico" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: test, request: "GET /favicon.ico HTTP/1.1", host: "test"
nginx 把D:\test 中的 \t 当作制表符处理了