注意下环境,不同环境下的操作可能会有差别
Ubuntu:
root@bmd-miot-c:/home/gpmbio# cat /proc/version
Linux version 4.15.0-108-generic (buildd@lcy01-amd64-013) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020
nginx:
root@bmd-miot-c:/home/gpmbio# nginx -v
nginx version: nginx/1.14.0 (Ubuntu)
查看nginx.conf配置文件目录
输入命令
# nginx -t
返回结果包含配置文件目录
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
查看nginx进程
gpmbio@bmd-miot-c:~$ ps -ef |grep nginx
root 9809 1 0 Jul02 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
root 9812 9809 0 Jul02 ? 00:00:00 nginx: worker process
root 9814 9809 0 Jul02 ? 00:00:00 nginx: worker process
root 9816 9809 0 Jul02 ? 00:00:00 nginx: worker process
root 9817 9809 0 Jul02 ? 00:00:00 nginx: worker process
gpmbio 23727 23283 0 01:13 pts/1 00:00:00 grep --color=auto nginx
附:
配置修改方法,https://www.cnblogs.com/tujietg/p/10753041.html
可惜没生效,但还是要继续研究的