You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tim Watts <tw...@dionic.net> on 2012/02/02 17:15:13 UTC
[users@httpd] Easy way to dump running server config for Apache2.0/2.2?
Hi folks,
I need a quick way to dump the parsed server config from a running
Apache2 server.
==========
Kind of like what mod_info gives. Specifically I want a dump of all the
active ServerName and ServerAlias directives.
I *could* do something dirty with perl, but I had temporary hope with
apache2 -S
only that seems to be limited to listing ServerName vhost values and
seems to ignore ServerAlias values.
Been through google and the man pages and nothing.
Is there a way to dump apache's parsed config from a running server with
one easy command?
==========
I should add that I need to automate this on 80+ running servers, so
changing the config is a bit of a non starter.
TIA for any ideas!
Cheers
Tim
--
Tim Watts
Personal Blog: http://www.dionic.net/tim/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Easy way to dump running server config for Apache2.0/2.2?
Posted by Tim Watts <tw...@dionic.net>.
On 02/02/12 22:59, Pete Houston wrote:
> On Thu, Feb 02, 2012 at 04:48:42PM +0000, Tim Watts wrote:
>> I don't have mod_info installed on 90% of the servers in question,
>> sadly. It is standard on my new build servers but I have a load of
>> legacy stuff.
>
> In that case, perhaps something as simple as the attached script would
> do?
Yes - that is basically what I was going to do if there was not an "easy
clean way". I'll tart it up to deal with comments and suchlike.
At times like this I am eternally grateful for pdsh :)
>> BTW the whole thing is for an audit of this EU "Cookie" legislation
>> nonsense. On the plus side, a full audit will help me get my records
>> and from there, my Nagios config upto date :)
>
> It really is nonsense, isn't it? I asked the ICO some pertinent
> questions about scope and query strings a while ago and the silence has
> been deafening. It's a complete waste of everyone's time.
>
Indeed. As I mentioned, I have a selfish reason for some mild enthusiasm
(though I have 2 dozen better things to be doing). If it weren't for
that, it would be straight under the carpet.
Fantastic timing though - right in the middle of a recession. Unless you
are an IT dude. I wonder what all the sites using Google Analytics will do?
Cheers!
Tim
--
Tim Watts
Personal Blog: http://www.dionic.net/tim/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Easy way to dump running server config for
Apache2.0/2.2?
Posted by Pete Houston <ph...@openstrike.co.uk>.
On Thu, Feb 02, 2012 at 04:48:42PM +0000, Tim Watts wrote:
> I don't have mod_info installed on 90% of the servers in question,
> sadly. It is standard on my new build servers but I have a load of
> legacy stuff.
In that case, perhaps something as simple as the attached script would
do?
> BTW the whole thing is for an audit of this EU "Cookie" legislation
> nonsense. On the plus side, a full audit will help me get my records
> and from there, my Nagios config upto date :)
It really is nonsense, isn't it? I asked the ICO some pertinent
questions about scope and query strings a while ago and the silence has
been deafening. It's a complete waste of everyone's time.
Pete
--
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107
Re: [users@httpd] Easy way to dump running server config for Apache2.0/2.2?
Posted by Tim Watts <tw...@dionic.net>.
On 02/02/12 16:31, Pete Houston wrote:
> On Thu, Feb 02, 2012 at 04:15:13PM +0000, Tim Watts wrote:
>> Kind of like what mod_info gives. Specifically I want a dump of all
>> the active ServerName and ServerAlias directives.
>
> Haven't you answered your own question there?
>
> lynx --dump http://name.of.server/server-info | grep -E 'Server(Name|Alias)'
>
> Tweak to suit,
>
> Pete
Ah - but no.
I don't have mod_info installed on 90% of the servers in question,
sadly. It is standard on my new build servers but I have a load of
legacy stuff.
Just tried 2 of the 3 (on debian 6) apache config parser modules and so
far 2 are useless (one does not follow includes and the other does not
seem to work well). One more to go...
I sortof assumed there might be an easy to get at debug feature hiding
somewhere that might dump a running config out. like apache2 -t -v,
except -v is something other that "verbose" and there does not seem to
be a verbose flag.
Cheers
Tim
BTW the whole thing is for an audit of this EU "Cookie" legislation
nonsense. On the plus side, a full audit will help me get my records and
from there, my Nagios config upto date :)
--
Tim Watts
Personal Blog: http://www.dionic.net/tim/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Easy way to dump running server config for
Apache2.0/2.2?
Posted by Pete Houston <ph...@openstrike.co.uk>.
On Thu, Feb 02, 2012 at 04:15:13PM +0000, Tim Watts wrote:
> Kind of like what mod_info gives. Specifically I want a dump of all
> the active ServerName and ServerAlias directives.
Haven't you answered your own question there?
lynx --dump http://name.of.server/server-info | grep -E 'Server(Name|Alias)'
Tweak to suit,
Pete
--
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107