当前位置: 技术问答>linux和unix
请问, 如何查找正在运行当中的程序的主目录
来源: 互联网 发布时间:2017-03-22
本文导语: 今天想给服务器配置一个php的小程序. 上服务器找apache程序. 先是ps看了下. 结果只有httpd -k start的命令, 没有目录, 后来用whereis httpd看了下. 结果如下. httpd: /usr/sbin/httpd.event /usr/sbin/httpd.worker /usr/sbin/httpd /etc/http...
今天想给服务器配置一个php的小程序.
上服务器找apache程序.
先是ps看了下. 结果只有httpd -k start的命令, 没有目录,
后来用whereis httpd看了下. 结果如下.
httpd: /usr/sbin/httpd.event /usr/sbin/httpd.worker /usr/sbin/httpd /etc/httpd /usr/lib/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
我就不知道该怎么查询现在的apache是运行的哪个文件里面的程序. 我就先用
find / -name httpd.conf看了..结果好多结果.
[root@user1 bin]# find / -name httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache2/conf/original/httpd.conf
/usr/local/www/wsgi/trunk/httpd.conf
/usr/local/httpd2.2.14/conf/httpd.conf
/usr/local/httpd2.2.14/conf/original/httpd.conf
/home/test/dalian/webapp/translate-service/web/META-INF/httpd.conf
/home/test/setupfiles/httpd-2.2.9/docs/conf/httpd.conf
/home/test/app/apache2/conf/original/httpd.conf
/home/test/app/apache2/conf/httpd.conf
/home/test/app/apacheHttpd2.2Home/conf/original/httpd.conf
/home/test/app/apacheHttpd2.2Home/conf/httpd.conf
/home/test/app/bakfiles/apache22/conf/original/httpd.conf
/home/test/app/bakfiles/apache22/conf/httpd.conf
/home/test/app/bakfiles/httpd-2.2.11/docs/conf/httpd.conf
/home/test/app/bakfiles/bak.apache20/conf/httpd.conf
/etc/httpd/conf/httpd.conf
请问... 我用什么方法可以查到现在apache启动的是哪个目录下的httpd, 用的是哪个httpd.conf文件.
菜鸟求救高手解答...
上服务器找apache程序.
先是ps看了下. 结果只有httpd -k start的命令, 没有目录,
后来用whereis httpd看了下. 结果如下.
httpd: /usr/sbin/httpd.event /usr/sbin/httpd.worker /usr/sbin/httpd /etc/httpd /usr/lib/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
我就不知道该怎么查询现在的apache是运行的哪个文件里面的程序. 我就先用
find / -name httpd.conf看了..结果好多结果.
[root@user1 bin]# find / -name httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache2/conf/original/httpd.conf
/usr/local/www/wsgi/trunk/httpd.conf
/usr/local/httpd2.2.14/conf/httpd.conf
/usr/local/httpd2.2.14/conf/original/httpd.conf
/home/test/dalian/webapp/translate-service/web/META-INF/httpd.conf
/home/test/setupfiles/httpd-2.2.9/docs/conf/httpd.conf
/home/test/app/apache2/conf/original/httpd.conf
/home/test/app/apache2/conf/httpd.conf
/home/test/app/apacheHttpd2.2Home/conf/original/httpd.conf
/home/test/app/apacheHttpd2.2Home/conf/httpd.conf
/home/test/app/bakfiles/apache22/conf/original/httpd.conf
/home/test/app/bakfiles/apache22/conf/httpd.conf
/home/test/app/bakfiles/httpd-2.2.11/docs/conf/httpd.conf
/home/test/app/bakfiles/bak.apache20/conf/httpd.conf
/etc/httpd/conf/httpd.conf
请问... 我用什么方法可以查到现在apache启动的是哪个目录下的httpd, 用的是哪个httpd.conf文件.
菜鸟求救高手解答...
|
这么多,不好说了, apachectrl默认使用工作路径下的conf下的httpd.conf, 启动者一般都是在那个路径下启动的, 但httpd可以配置切换工作目录,所以又不好说了。
|
apache的配置文件http.conf的目录文件配置相应的目录不正确原因导致,不能找不指定目录
下的文件。
下的文件。