In linux, how does one check which httpd. conf apache uses?

Source: Internet
Author: User
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, Step 1: Find the apache startup command:

ps -ef|grep httpdroot     10575   1  0 19:45 ?    00:00:03 /usr/sbin/httpd -k startmyuser   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:

ps -ef|grep httpdroot     10575     1  0 19:45 ?        00:00:03 /usr/sbin/httpd -k startapache   10577 10575  0 19:45 ?        00:00:00 /usr/sbin/httpd -k startapache   10583 10575  0 19:45 ?        00:00:00 /usr/sbin/httpd -k startapache   10584 10575  0 19:45 ?        00:00:00 /usr/sbin/httpd -k startapache   10587 10575  0 19:45 ?        00:00:00 /usr/sbin/httpd -k startapache   10590 10575  0 19:45 ?        00:00:00 /usr/sbin/httpd -k startapache   10591 10575  0 19:45 ?        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.

/usr/sbin/httpd -SVirtualHost configuration:211.157.8.76:80        is a NameVirtualHostdefault 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

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.