Practical mod_perl / HTML Book /



previous page: 5.4. Using apachectl to Control the Server
  
page up: HTML Version of the book
  
next page: 5.6. Setuid root Startup Scripts

5.5. Validating Server Configuration


If the configuration file has syntax errors, attempting to restart the server will fail and the server will die. However, if a graceful restart is attempted using apachectl and the configuration file contains errors, the server will issue an error message and continue running with the existing configuration. This is because apachectl validates the configuration file before issuing the actual restart command when a graceful restart is requested.

Apache provides a method to check the configuration's syntax without actually starting the server. You can run this check at any time, whether or not a server is currently running. The check has two forms, using the -t or -T options. For example:

panic% /home/httpd/httpd_perl/bin/httpd_perl -t

-t will verify that the DocumentRoot directory exists, whereas -T will not. -T is most useful when using a configuration file containing a large number of virtual hosts, where verifying the existence of each DocumentRoot directory can take a substantial amount of time.

Note that when running this test with a mod_perl server, the Perl code will be executed just as it would be at server startup—that is, from within the httpd.conf <Perl> sections or a startup file.

 

Continue to:

  • prev: 5.4. Using apachectl to Control the Server
  • Table of Contents
  • next: 5.6. Setuid root Startup Scripts







TOP
previous page: 5.4. Using apachectl to Control the Server
  
page up: HTML Version of the book
  
next page: 5.6. Setuid root Startup Scripts


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com