nginx错误:unknown directive "锘? in F:\nginx/conf/nginx.conf:3

C:\Users\Administrator>d:

D:\>cd D:\nginx-1.4.7

D:\nginx-1.4.7>start nginx.exe

D:\nginx-1.4.7>nginx -s reload
nginx: [emerg] unknown directive "锘? in D:\nginx-1.4.7/conf/nginx.conf:3

D:\nginx-1.4.7>nginx -s reload
nginx: [emerg] unknown directive "锘? in D:\nginx-1.4.7/conf/nginx.conf:3

D:\nginx-1.4.7>tasklist /fi "imagename eq nginx.exe"

映像名称 PID 会话名 会话# 内存使用
========================= ======== ================ =========== ============
nginx.exe 3036 RDP-Tcp#0 2 5,344 K
nginx.exe 3088 RDP-Tcp#0 2 5,624 K

D:\nginx-1.4.7>nginx -s stop
nginx: [emerg] unknown directive "锘? in D:\nginx-1.4.7/conf/nginx.conf:3

D:\nginx-1.4.7>





原因及解决:
conf文件被记事本编辑过,保存成了含BOM头的文件
使用其他编辑器将文件另存为UTF-8不含Bom头的格式
注:记事本编辑UTF-8都会加BOM头

 




 -END-

 
posted @ 2015-07-28 18:02  jstarseven  阅读(12691)  评论(0编辑  收藏  举报