今天在测试环境中更改了文件夹名,原来文件夹的名字是叫dist
,但是为了区分是测试环境,所以我改成了test
,本来以为改下路径就好了的,但是却一直访问不了,查看日志文件发现test
中的t
字母不见了,\t
被解析了,导致找不到目录。

错误写法
location / {
root C:\Users\Administrator\www\test;
}
正确写法
location / {
root "C:/Users/Administrator/www/test";
}
Windows中的命令
- 查看Nginx的版本号:
nginx -V
- 启动Nginx:
start nginx
- 快速停止或关闭Nginx:
nginx -s stop
- 正常停止或关闭Nginx:
nginx -s quit
- 测试配置文件:
nginx -t
- 配置文件修改重装载命令:
nginx -s reload
- 查看windows任务管理器下Nginx的进程命令:
tasklist /fi "imagename eq nginx.exe"
-杀掉进程:taskkill /pid 1596 /f
image.png
网友评论