Pass different httpd. conf files to apachectl in Linux
Source: Internet
Author: User
In Linux, you can pass different httpd. conf files to apachectl. Generally, you can modify the original httpd. conf file to try different Apache configurations. If an error occurs, you can cancel the change. Instead of modifying httpd. conf, we copy it as httpd. conf. debug ,...
In Linux, you can pass different httpd. conf files to apachectl. Generally, you can modify the original httpd. conf file to try different Apache configurations. If an error occurs, you can cancel the change. We are not in httpd. conf is modified, but it is copied as httpd. conf. debug, set httpd. conf. debug is passed to Apache as a new configuration file for testing purposes, as shown in the example using option-f. Www.2cto.com # apachectl-f conf/httpd. conf. debug # httpd-k start-f conf/httpd. conf. debug [Note: As shown above, apachectl or httpd can be used] # ps-ef | grep http root 25080 1 0 00:00:00/usr/sbin/httpd-f conf/httpd. conf. debug apache 25099 25080 0 00:00:00/usr/sbin/httpd-f conf/httpd. conf. debug [Note: The ps shows that httpd is using httpd. conf. debug] when you are satisfied with this change and Apache works normally, you can overwrite the original httpd configuration file. conf, and then start Apache normally, as shown below: www.2cto.com # cp httpd. conf. debug httpd. conf # apachectl stop # apachectl start # ps-ef | grep httpd root 25114 1 0 00:00:00/usr/sbin/httpd-k start daemon 25115 25114 0 00:00:00/usr/sbin/ httpd-k start [note: ps indicates that the running httpd uses the default configuration file]
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