Re: recovering a .conf file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



André Warnier wrote:
Brian Munroe wrote:
On Wed, Nov 26, 2008 at 8:21 AM, André Warnier <aw@xxxxxxxxxx> wrote:
John Clement wrote:
I was serious when I asked about mod_perl.
Have a look here :
http://perl.apache.org/docs/2.0/api/Apache2/Directive.html
and particularly at
 use Data::Dumper;
  print Dumper $tree->as_hash;

So, is mod_perl installed as part of your Apache, or not ?

If it is installed, then it might be as simple as creating a small perl script, copying it into your cgi-bin directory, and run it.

Maybe. I haven't tested it. But it would be worth a try.

Replying to myself now.
Here is the perl script, could not resist trying it out.

#!/usr/bin/perl -w
use strict;
use Apache2::Directive ();
use Data::Dumper;
$Data::Dumper::Indent = 1;
my $tree = Apache2::Directive::conftree();
    print "Content-type: text/plain\n\n";
    print Dumper $tree->as_hash;
    exit 0;

It prints absolutely the full configuration, even directives I did not even know I had (probably the defaults assumed by Apache for some things).
Only works if you have mod_perl though.
This being said, since I do have mod_perl configured, I will leave this script installed, just in case I ever encounter the same problem as the OP here.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux