Windows2019安装nginx
windows2019不使用iis,安装nginx提供http下载服务,并注册为系统服务
http://nginx.org/en/download.html 下载nginx/Windows
解决windows nginx中文路径乱码
控制面板--区域--管理--非Unicode程序的语言--更改系统区域设置
勾选Beta版:使用Unicode UTF-8提供全球语言支持,确定
重启系统
解压后打开E:\nginx\conf\nginx.conf 修改需要提供http的路径,设置charset解决中文路径乱码、404和An error occurred错误
打开目录浏览autoindex功能,加入
autoindex on; autoindex_exact_size off; autoindex_localtime on;
服务注册工具下载 nginx.zip
修改nginx服务注册配置文件,修改为对应路径
<service> <id>nginx</id> <name>nginx</name> <description>nginx web server</description> <logpath>E:\nginx\logs\</logpath> <logmode>roll</logmode> <depend></depend> <executable>E:\nginx\nginx.exe</executable> <stopexecutable>E:\nginx\nginx.exe -s stop</stopexecutable> </service>
cmd下将nginx注册为系统服务
注册 winsw.exe install nginx 拆卸 winsw.exe uninstall nginx
注册正常
启动服务
打开浏览器测试,打开中文路径,路径下包含中文文件,正常不报错
本站所有文章均可随意转载,转载时请保留原文链接及作者。