Linux服务器查询Nginx安装目录以及Nginx配置文件nginx.conf路径的方法:
查看nginx安装目录
执行命令:ps -ef | grep nginx
1 2 3 4 5 |
[root@lamplnmp ~]# ps -ef | grep nginx root 4371 4351 0 13:41 pts/2 00:00:00 grep --color=auto nginx root 30765 1 0 13:20 ? 00:00:00 nginx: master process /www/server/nginx/sbin/nginx -c /www/server/nginx/conf/nginx.conf www 30766 30765 0 13:20 ? 00:00:00 nginx: worker process www 30767 30765 0 13:20 ? 00:00:00 nginx: cache manager process |
我们看到nginx的安装目录在:/www/server/nginx
查看nginx.conf配置文件目录
执行命令:nginx -t
1 2 3 |
[root@lamplnmp ~]# nginx -t nginx: the configuration file /www/server/nginx/conf/nginx.conf syntax is ok nginx: configuration file /www/server/nginx/conf/nginx.conf test is successful |
Nginx启动/重启/停止命令
Nginx启动命令:service nginx start
Nginx重启命令:service nginx restart
Nginx停止命令:service nginx stop
2021服务器价格出炉,又降价了!
拼团:阿里云服务器拼团(全网最低价,直接买不用拉人)
①真便宜:阿里云服务器69元1年,203元3年(全网最低价)
②腾讯云:腾讯云服务器特惠88元一年起(有高配)
③代金券:2021阿里云代金券一键领取中
发表评论