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-nginx