Find nginx version?

前端 未结 6 1282
生来不讨喜
生来不讨喜 2021-02-01 11:50

I have installed nginx on Debian 7 with the following steps

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx
sudo service nginx start
<         


        
6条回答
  •  抹茶落季
    2021-02-01 12:43

    If you don't know where it is, locate nginx first.

    ps -ef | grep nginx
    

    Then you will see something like this:

    root      4801     1  0 May23 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf
    root     12427 11747  0 03:53 pts/1    00:00:00 grep --color=auto nginx
    nginx    24012  4801  0 02:30 ?        00:00:00 nginx: worker process                              
    nginx    24013  4801  0 02:30 ?        00:00:00 nginx: worker process
    

    So now you already know where nginx is. You can use the -v or -V. Something like:

    /opt/nginx/sbin/nginx -v
    

提交回复
热议问题