上述是采用向 Nginx 发送信号的方式,或者使用: 有两种可以查看 Nginx 的版本信息的参数。第一种如下: 另一种显示的是详细的版本信息: 如果出现如上的提示信息,表示没有访问错误日志文件和进程,可以 如果显示如上,则表示配置文件正确。否则,会有相关提示。 或者: 以上这些涵盖了 Nginx 日常维护的所有基本操作,另外还有向 master 进程发送信号的相关命令,我们会在后续看到。 - 转载请注明来自“柳大的CSDN博客”:?blog.CSDN.net/Poechant -高性能Web服务器Nginx的配置与部署研究(4)Nginx常用命令
1. 启动 Nginx
poechant@ubuntu:sudo ./sbin/nginx
2. 停止 Nginx
poechant@ubuntu:sudo ./sbin/nginx -s stop
poechant@ubuntu:sudo ./sbin/nginx -s quit
-s
都是采用向 Nginx 发送信号的方式。3. Nginx 重载配置
poechant@ubuntu:sudo ./sbin/nginx -s reload
poechant@ubuntu:service nginx reload
4. 指定配置文件
poechant@ubuntu:sudo ./sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-c
表示configuration
,指定配置文件。5. 查看 Nginx 版本
poechant@ubuntu:/usr/local/nginx$ ./sbin/nginx -v
nginx: nginx version: nginx/1.0.0
poechant@ubuntu:/usr/local/nginx$ ./sbin/nginx -V
nginx: nginx version: nginx/1.0.0
nginx: built by gcc 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
nginx: TLS SNI support enabled
nginx: configure arguments: --with-http_ssl_module --with-openssl=/home/luming/openssl-1.0.0d/
6. 检查配置文件是否正确
poechant@ubuntu:/usr/local/nginx$ ./sbin/nginx -t
nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13: Permission denied)
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
2012/01/09 16:45:09 [emerg] 23898#0: open() "/usr/local/nginx/logs/nginx.pid" failed (13: Permission denied)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
sudo
(super user do
)一下:poerchant@ubuntu:/usr/local/nginx$ sudo ./sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
7. 显示帮助信息
poechant@ubuntu:/user/local/nginx$ ./sbin/nginx -h
poechant@ubuntu:/user/local/nginx$ ./sbin/nginx -?
详细解决方案
高性能Web服务器Nginx的配备与部署研究(4)Nginx常用命令
热度:315 发布时间:2012-07-01 13:15:00.0
相关解决方案
- 刚配置了 centos+nginx+php 但DEDE的验证码就是无法显示解决方案
- 刚刚配置了 centos+nginx+php 但DEDE的验证码就是无法显示
- (转)Solaris 十 常用命令
- linux 上 svn 常用命令
- nginx 502 Bad Gateway 异常解决方法
- nginx + php 执行过程中出现404该如何解决
- nginx +php 环境筹建之php安装
- nginx 配备php环境
- windows nginx +php 配备
- MYSQL interactive_timeout跟wait_timeout、NGINX keepalive_timeout
- linux+nginx 应用include无法包含文件?
- nginx,php不能上传大图有关问题(413)
- linux 环境上 nginx 环境搭建
- Nginx 兑现双机热备(接口)
- Nginx 实现双机热备(接口)解决办法
- nginx php fastcgi Connection reset by peer的原因及解决方法
- NGINX 多域名日记切割备份脚本
- nginx 日记每日轮询脚本
- nginx upstream 几种配备分类 此文转载
- nginx gzip 静态资料压缩
- Nginx反向署理不跳转(nginx/java/tomcat/jsp)
- Nginx+iptables障蔽
- (转载)web服务器比较Apache Nginx lighttpd HAProx Litespeed 缓冲原懂得析fastcgi性能
- nginx 配置.json文件直接访问,不上载
- nginx+websphere sendRedirect 端口异常
- linux 环境下 nginx 环境搭建,该怎么处理
- nginx 加加了图片缓存后,打开页面,图片显示不出来
- nginx +tomcat+memcached集群,写session不生效解决方法
- 413 Request Entity Too Large nginx/0.7.65上传文件大小受限制,求好手指导!
- nginx 与 tomcat 集群 一二事 (零)