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 当作制表符处理了
本文详细介绍了在Windows环境下配置虚拟主机时遇到的文件路径错误问题,特别关注了路径符号的使用规范,并通过实例解析了如何正确配置虚拟主机,避免了常见的错误,确保了服务器正常运行。
3408

被折叠的 条评论
为什么被折叠?



