Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
You can do more with httpd than just stop/start/reload Apache. Here are some command-line options that enable you
to manipulate your configuration without changing httpd.conf.
NB: Some distributions (e.g., Debian) use apache instead of
httpd. The options should all be exactly the same. If in doubt,
check the apachectl script to see what the HTTPD variable is
set to.
After you’re done with any of these, httpd -k stop; apachectl start will restart with your normal settings.
- httpd -k start -c "DocumentRoot /var/www/html_debug/": Start up Apache using an alternative DocumentRoot. This is useful if you’re trying out alternative versions of your web site, as it avoids editing the DocumentRoot option. You can also use -c to set any other directive. Note that -c processes the directive after reading the config files (so it will overwrite config file settings), whereas -C will process the directive before the config files.
- httpd -k start -f conf/httpd.conf.debug: Start Apache with a different config file. This is in effect an alternative to backing up your old config file and then editing the original. It’s particularly useful if you manage config files with Puppet, as it ensures that changes will not be overwritten while you’re experimenting.
- httpd -D loadmodule: Set the parameter loadmodule, which will then be used when parsing the config file. So if your config file includes this:
LoadModule my_other_module
|
then my_other_module will be loaded only if the parameter is set.
You can use this for testing modules before adding them
permanently.
This article was first published on ServerWatch.com.
RELATED NEWS AND ANALYSIS
-
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
-
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
-
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
-
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
-
Top 10 AIOps Companies
FEATURE | By Samuel Greengard,
November 05, 2020
-
What is Text Analysis?
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
-
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
-
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
-
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
-
Top 10 Chatbot Platforms
FEATURE | By Cynthia Harvey,
October 07, 2020
-
Finding a Career Path in AI
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
-
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
-
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
-
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
-
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
-
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
-
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
-
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
-
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020