After installing nginx

Which configuration file / / specified nginx use [root @ localhost sbin] #. / nginx - c/usr/local/nginx/conf/nginx. Conf / / load the configuration file Restart [root @ localhost sbin]# ./nginx -s reloadCopy the code

Find nginx PID

[root @ iZ2ze8gmxmxwd4e3qze8q0Z conf. D] # netstat anop | grep 0.0.0.0: TCP 80 0 0 0.0.0.0:0.0.0.0:80 * 454 / nginx LISTEN: Worker p off (0.00/0/0) TCP 00 0.0.0.0:8000 0.0.0.0:* LISTEN 454/nginx: The worker p off (0) / 0.00/0 [root @ iZ2ze8gmxmxwd4e3qze8q0Z conf. D] # ss - NLTP | grep nginx LISTEN: 0 128 * 80 * : * users:(("nginx",pid=466,fd=12),("nginx",pid=455,fd=12),("nginx",pid=454,fd=12)) LISTEN 0 128 *:443 *:* users:(("nginx",pid=466,fd=13),("nginx",pid=455,fd=13),("nginx",pid=454,fd=13)) LISTEN 0 128 *:8000 *:* users:(("nginx",pid=466,fd=14),("nginx",pid=455,fd=14),("nginx",pid=454,fd=14)) [root@iZ2ze8gmxmxwd4e3qze8q0Z conf.d]#Copy the code

Linux view the nginx startup path according to the above

[root @ iZ2ze8gmxmxwd4e3qze8q0Z conf. D] # netstat anop | grep 0.0.0.0: TCP 80 0 0 0.0.0.0:0.0.0.0:80 * 454 / nginx LISTEN: Worker p off (0.00/0/0) TCP 00 0.0.0.0:8000 0.0.0.0:* LISTEN 454/nginx: The worker p off (0) / 0.00/0 [root @ iZ2ze8gmxmxwd4e3qze8q0Z conf. D] # ss - NLTP | grep nginx LISTEN: 0 128 * 80 * : * users:(("nginx",pid=466,fd=12),("nginx",pid=455,fd=12),("nginx",pid=454,fd=12)) LISTEN 0 128 *:443 *:* users:(("nginx",pid=466,fd=13),("nginx",pid=455,fd=13),("nginx",pid=454,fd=13)) LISTEN 0 128 *:8000 *:* users:(("nginx",pid=466,fd=14),("nginx",pid=455,fd=14),("nginx",pid=454,fd=14)) [root@iZ2ze8gmxmxwd4e3qze8q0Z conf.d]# Ll /proc/466/exe LRWXRWXRWX 1 root root 0 3月 24 15:22 /proc/466/exe -> /usr/sbin/nginx [root@iZ2ze8gmxmxwd4e3qze8q0Z conf.d]# /usr/sbin/nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [root@iZ2ze8gmxmxwd4e3qze8q0Z conf.d]#Copy the code