In Linux, how does one view that Apache uses httpd. conf?
Step 1: Find the Apache startup command:
[Root @ wapbj01 ~] # Ps-Ef | grep httpd
Root 10575 1 0 19: 45? 00:00:03/usr/sbin/httpd-K start
Myuser 15356 2982 0 jan19? 00:00:00/home/Apache/bin/httpd-f/home/Apache/CONF/httpd. conf-K start
If the httpd command uses the-F option, you can directly obtain the configuration file directory.
If the httpd command does not use the-F option, for example:
[Root @ wapbj01 ~] # Ps-Ef | grep httpd
Root 10575 1 0 19: 45? 00:00:03/usr/sbin/httpd-K start
Apache 10577 10575 0? 00:00:00/usr/sbin/httpd-K start
Apache 10583 10575 0? 00:00:00/usr/sbin/httpd-K start
Apache 10584 10575 0? 00:00:00/usr/sbin/httpd-K start
Apache 10587 10575 0? 00:00:00/usr/sbin/httpd-K start
Apache 10590 10575 0? 00:00:00/usr/sbin/httpd-K start
Apache 10591 10575 0? 00:00:00/usr/sbin/httpd-K start
Perform step 2.
Step 2: run the httpd-s command to find the path of the configuration file.
[Root @ wapbj01 ~] #/Usr/sbin/httpd-S
Virtualhost Configuration:
211.157.8.76: 80 is a namevirtualhost
The default server wap.wapwu.com (/etc/httpd/CONF/httpd. conf: 1041)
Port 80 namevhost wap.wapwu.com (/etc/httpd/CONF/httpd. conf: 1041)
Port 80 namevhost wapu.wapwu.com (/etc/httpd/CONF/httpd. conf: 1052)
Wildcard namevirtualhosts and _ default _ servers:
_ Default _: 443 211.157.8.76 (/etc/httpd/CONF. d/SSL. conf: 88)
Syntax OK
[Root @ wapbj01 ~] #
From the log information output by Apache, you can see that the configuration file is in the/etc/httpd/CONF/directory.