1, the system environment Windows 10
2, set a static site directory, be careful not to appear Chinese (here, stepped on a lot of the pit, you can view the error log error.log,
“No mapping for the Unicode character exists in the target multi-byte code page”)
Here a little test directory
3, configuration nginx.conf
server { listen 9001; server_name localhost; access_log logs/access/9001.log; #off;不记录请求日志 charset utf-8; location /{ root E:/local/nginx/sites/9001; } location /download/{ root E:/local/nginx/sites/9001; autoindex on; autoindex_exact_size off; autoindex_localtime on; } error_page 404 ../404page/index.html; }
Listen Port: 9001
Sites Directory: E: / local / nginx / sites / 9001;
Settings can browse the directory path: download
404: Jump to page 404
Chinese directory and file name garbled, did not find the decision in the Windows temporary solution method.