Windows nginx 操作和配置

网友投稿 975 2022-09-10

Windows nginx 操作和配置

Windows nginx 操作和配置

Windows nginx 操作和配置

Windows 上的 nginx 只是一个简单的程序,并不是以服务的形式存在的。 所以只需要操作原可执行文件即可。

一、-解压

二、使用

1. 一般的操作

你可以直接双击它来启动它,此时 nginx 使用的配置文件是 ​​./conf/nginx.conf​​ ,但不能实现指定配置文件,重新加载配置文件等操作。

2. 指令操作

也可以通过命令行来操作它,切换到当前 nginx 目录下, ​​nginx.exe -h​​ 可以查看它的使用帮助

# nginx.exe -hnginx version: nginx/1.20.1Usage: nginx [-?hvVtTq] [-s signal] [-p prefix] [-e filename] [-c filename] [-g directives]Options: -?,-h : this help -v : show version and exit -V : show version and configure options then exit -t : test configuration and exit -T : test configuration, dump it 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) -e filename : set error log file (default: logs/error.log) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration file

可以看到,操作主程序的指令是 ​​-s​​ 参数,有以后几个操作:

指令

说明

start nginx.exe

启动 nginx

nginx.exe -s stop

停止

nginx.exe -s quit

退出程序

nginx.exe -s reopen

重新打开

nginx.exe -s reload

重新加载配置文件

还可以使用 ​​-c​​​ 来指定程序加载的配置文件,如果不指定,会默认加载程序目录下的 ​​./conf/nginx.conf​​ 文件

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Swift 3.0 iOS 如何绘制 1px 宽的描边
下一篇:Pyhton 连接数据库(python入门教程(非常详细))
相关文章

 发表评论

暂时没有评论,来抢沙发吧~