Skip navigation

Category Archives: /home/bryn/src/sh/

Here’s an Apache one-liner I often find myself using. It will list all of the server names and alises that are contained in the active Apache config files on a machine. I’ll go into the parts of the command and how to modify it to suit your needs. This assumes a bash-like shell (with grep, sed, sort, tr and a for loop), root (or permission to run the httpd binary directly) and if you wish to modify the examples, a little command-fu.

Read More »