-1

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.

childno͡.de
  • 631
  • 1
  • 5
  • 14
  • related : https://stackoverflow.com/questions/27152943 https://superuser.com/questions/922869 https://unix.stackexchange.com/questions/129026 https://serverfault.com/questions/425894 https://serverfault.com/questions/696164 https://serverfault.com/questions/500329 https://serverfault.com/questions/489018 https://serverfault.com/questions/42539 http://httpd.apache.org/docs/current/mod/mod_info.html http://httpd.apache.org/docs/current/invoking.html – immeëmosol Jul 19 '17 at 09:10

2 Answers2

1

You probably want mod_info

NOTE that apache configuration is not XML.

adaptr
  • 16,479
  • 21
  • 33
  • yeah, but it's not really user-friendly / readable for documentation purposes?! – childno͡.de Sep 10 '12 at 09: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 '12 at 10:20
  • At the moment http://www.askapache.com/pub/servers/mod_info.c.html provides sourcecode for mod_info /server-info . – immeëmosol Jul 19 '17 at 08:44
0

From the man page for httpd:

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

Jenny D
  • 27,358
  • 21
  • 74
  • 110
  • 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?! – childno͡.de Sep 10 '12 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 '12 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 – childno͡.de Sep 10 '12 at 10:23
  • apachectl != httpd... but never mind. – Jenny D Sep 10 '12 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) – childno͡.de Sep 10 '12 at 10:37
  • Note that `apachectl -S` shows the configuration as it is parse from the filesystem, which is not necessarily the config that is loaded into apache. – immeëmosol Jul 19 '17 at 08:45
  • @immeëmosol Right, it says that right there in the quoted man page. – Jenny D Jul 19 '17 at 10:11