nginx访问报错 (123: The filename, directory name, or volume label syntax is incorrect)

windows用nginx访问tomcat项目,一直报错,通过查看日志,找到问题所在 

nginx访问报错 (123: The filename, directory name, or volume label syntax is incorrect)

2020/06/08 10:55:25 [crit] 17080#13152: *20 CreateFile() "E:
test\test/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "localhost"
2020/06/08 10:55:25 [crit] 17080#13152: *21 CreateFile() "E:
test\test/favicon.ico" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: , request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/"

 

捣鼓了半天终于找到解决办法了,将配置的本地路径中“\”改为“\\”,

修改之前配置

nginx访问报错 (123: The filename, directory name, or volume label syntax is incorrect)

修改之后配置

nginx访问报错 (123: The filename, directory name, or volume label syntax is incorrect)

修改完成之后,nginx.exe -s reload重启nginx,就可以正常访问了