root@hcss-ecs-d6be:/etc# ps aux|grep nginx root 538024 0.0 0.0 15672 1004 ? Ss Aug10 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 538025 0.0 1.4 37932 25888 ? S Aug10 0:00 nginx: worker process nginx 538026 0.0 1.4 37924 25864 ? S Aug10 0:05 nginx: worker process root 927076 0.0 0.1 6476 2252 pts/0 S+ 14:28 0:00 grep --color=auto nginx
nginx的路径为:/usr/sbin/nginx
2.查看nginx配置文件路径
1 2 3
root@hcss-ecs-d6be:/etc# /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
nginx的配置文件路径为: /etc/nginx/nginx.conf
网页访问路径为:/usr/share/nginx/html
ps 命令
1 2 3 4 5
root@hcss-ecs-d6be:/etc# ps aux|grep nginx root 538024 0.0 0.0 15672 1004 ? Ss Aug10 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 538025 0.0 1.4 37932 25888 ? S Aug10 0:00 nginx: worker process nginx 538026 0.0 1.4 37924 25864 ? S Aug10 0:05 nginx: worker process root 927128 0.0 0.1 6476 2428 pts/0 S+ 14:33 0:00 grep --color=auto nginx