Nginx 帮助
E:\EQX-projects\nginx-1.8.1>nginx -?
nginx version: nginx/1.8.1
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v: show version and exit
-V: show version and configure options then exit
-t: test configuration and exit
-q: suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: NONE)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
总结:
- -t 检查配置
- -s reload nginx修改配置后重载
- nginx {start|restart|stop} nginx启动/重启/停止
注意区别:(index.html 中引用的js,css 是否可以正常访问)
location /details {
root html;
index index.html index.htm;
try_files $uri $uri/ /details/index.html =404;
}
location /details {
root html/details;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}