Friday, August 22, 2008

9 Tips to Use Apachectl and Httpd like a Power User

After you have installed Apache2, if you want to use apachectl and httpd to it’s maximum potential, you should go beyond using start, stop and restart. The 9 practical examples provided in this article will help you to use apachectl and httpd very effectively.

Apachectl acts as SysV init script, taking arguments like start, stop, restart and status. It also acts as front-end to httpd command, by simply passing the command line arguments to httpd.  So, all the commands you execute using apachectl, can also be executed directly by calling httpd.

1. Pass different httpd.conf filename to apachectl
2. Use a temporary DocumentRoot without modifying httpd.conf
3. Increase the LogLevel temporarily
4. Display the modules compiled inside Apache using option -l
5. Display both static and dynamic module loaded by Apache
6. Show all accepted directives inside httpd.conf
7. Validate the httpd.conf after making changes
8. Display the httpd build parameters
9. Load a specific module only on demand.

Read more here: 9 Tips to Use Apachectl and Httpd like a Power User