3

I am running an Apache2 web-server. I would like to be able to access the kind of information made available by the mod_info and mod_status modules via the command-line, either through a scripting language such as Python or through a command-line utility. Is this a possibility?

For example, I can use curl to inspect header information:

curl --head 'http://127.0.0.1/server-info'

This gives me a convenient way to verify that my header configuration settings have taken effect and are working properly. It would be nice if there were a similar way (syntactically speaking) to verify other settings.

I've considered parsing the output of the 'mod_info', but I'm hoping that there is a preexisting (and cleaner) solution.

1

There is no command line interface into the two modules you have mentioned. They are designed to be output to the browser by creating a location entry in the conf file and using the SetHandler directive. Unfortunately there is no predefined "cleaner" solution to parse through the data and you may need to roll your own.

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.