nginx: [emerg] CreateFile() "D:\Work\XX项目\nginx-1.20.1/conf/nginx.conf" failed (1113: No mapping for the Unicode character exists in the target multi-byte code page)
nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in D:\Work\nginx-1.20.1/conf/nginx.conf:49
在启动nginx时报如下错误:
原因是启动目录包含中文,在将目录修改为全英文目录后,启动正常。
Update at:2021-06-29 采用nginx进行路径映射,启动报proxy_pass相关错误
原始的路径转换规则是:
这个转换包含正则表达式,去掉正则表达式直接进行路径匹配可以解决该问题。