本文摘自PHP中文网,作者(*-*)浩,侵删。

检查配置文件并启动Nginx服务
1.检查配置文件 (推荐学习:nginx教程)
Nginx的主程序提供了“-t”选项来对配置文件进行检查,以便找出不当或错误的配置。
1 2 3 | [root@centos7-1 nginx-1.12.0]# 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
|
2.启动Nginx
直接运行Nginx即可启动Nginx服务器
1 2 3 | [root@centos7-1 nginx-1.12.0]# nginx
[root@centos7-1 nginx-1.12.0]# killall -1 nginx
[root@centos7-1 nginx-1.12.0]# killall -3 nginx
|
3.使用Nginx服务脚本
为了使nginx服务的启动、停止、重载等操作更加方便,可以编写nginx服务脚本,并使用chkconfig和systemctl工具来进行管理,这更加符合系统的管理习惯。
阅读剩余部分
相关阅读 >>
nginx配置aliyun https
详细介绍nginx的rewrite(地址重定向)
nginx最新版本是多少
404 not found nginx是什么意思
nginx的进程名称是什么
linux如何启动nginx?
nginx的配置系统由什么构成
nginx的优势体现在哪几个方面
nginx哪个版本性能好
nginx是否在启动
更多相关阅读请进入《nginx》频道 >>
转载请注明出处:木庄网络博客 » 怎么实现nginx访问