Is there a native way to get a simple HTML / XML & XSD output for Apache VHost and Directives?

On console I write:

apachectl -S

If there is no native one, is there an (open) Script / Tool (php, perl, etc.) managing this.

I'm NOT looking for server management but just for a "server config overview" which might be (iframe) included in a wiki page for references on different development machines.


2 Answers 2


You probably want mod_info

NOTE that apache configuration is not XML.

  • yeah, but it's not really user-friendly / readable for documentation purposes?! Sep 10, 2012 at 9:51
  • What's wrong with the configuration ? That's as readable as it is going to get, since anything you derive from that will be...derived from that.
    – adaptr
    Sep 10, 2012 at 10:20
  • At the moment askapache.com/pub/servers/mod_info.c.html provides sourcecode for mod_info /server-info . Jul 19, 2017 at 8:44

From the man page for httpd:

-S Show the settings as parsed from the config file (currently only shows the virtualhost settings).

  • Yes, that's what I read on console and want to get in HTML format for documentation purposes automatically?! Didn't get it why this should be an answer?! Sep 10, 2012 at 10:09
  • If you'd mentioned in your question that you had already tried that option, I wouldn't have given that answer. Last I checked, it was possible to include raw text into a web page.
    – Jenny D
    Sep 10, 2012 at 10:19
  • Dear @Jenny, I DID wrote it above: "On console I write …" nevertheless, that's not what I'm looking for and thank you Sep 10, 2012 at 10:23
  • apachectl != httpd... but never mind.
    – Jenny D
    Sep 10, 2012 at 10:26
  • right, but does exactly the same here and also gives exactly the same output with -h for me (self-compiled Apache 2.4 without distr. changes) Sep 10, 2012 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.