In Linux, how does one view that Apache uses httpd. conf?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.