Nginx 命令

简介: Nginx 命令

Nginx 命令

进入 Nginx 安装目录下的 sbin 目录


基础命令

# 启动命令, -c Nginx配置文件
./nginx -c /usr/local/nginx/conf/nginx.conf
# 重新加载配置文件
./nginx -s reload
# 快速停止 Nginx
./nginx -s stop
# 完整有序的停止
./nginx -s quit
# 重启
./nginx -s reopen


其他命令

# 测试 Nginx 配置文件是否正确两种方式
./nginx -t -c /usr/local/nginx/conf/nginx.conf
./nginx -t
# 查看版本
./nginx -v


Nginx 所有命令

nginx version: nginx/1.15.8
Usage: nginx [-?hvVtTq] [-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
  -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: /usr/local/nginx/)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file


目录
相关文章
|
11月前
|
应用服务中间件 nginx Windows
windows下DOS命令杀掉Nginx应用进程
windows下DOS命令杀掉Nginx应用进程
138 1
|
12月前
|
应用服务中间件 nginx 数据安全/隐私保护
百度搜索:蓝易云【Nginx启动,重启以及基本命令详解!】
请注意,上述命令可能需要在终端中以管理员权限(使用sudo)运行。根据你的系统配置和安装方式,可能会有所不同。确保使用适用于你的系统的正确命令。
148 3
|
应用服务中间件 nginx
Nginx 常用命令
Nginx 常用命令
83 2
|
5月前
|
缓存 负载均衡 应用服务中间件
Nginx安装与使用: Nginx之编译安装的nginx加入systemctl、Nginx命令
Nginx安装与使用: Nginx之编译安装的nginx加入systemctl、Nginx命令
147 0
|
2月前
|
应用服务中间件 nginx
Nginx——相关命令
Nginx——相关命令
26 0
|
3月前
|
应用服务中间件 nginx
Nginx命令配置到系统环境变量
Nginx命令配置到系统环境变量
|
4月前
|
NoSQL 关系型数据库 MySQL
linux服务器重启php,nginx,redis,mysql命令
linux服务器重启php,nginx,redis,mysql命令
64 1
|
3月前
|
应用服务中间件 nginx
cmd 杀掉 nginx后台进程 命令杀掉nginx后台 nginx 常用命令
cmd 杀掉 nginx后台进程 命令杀掉nginx后台 nginx 常用命令
148 0
|
3月前
|
前端开发 应用服务中间件 Linux
Nginx15-16服务器启停命令
Nginx15-16服务器启停命令
|
3月前
|
应用服务中间件 Linux 开发工具
Nginx14---目录结构分析,查看Ngnix访问日志命令的写法​
Nginx14---目录结构分析,查看Ngnix访问日志命令的写法​