This is easy to do with sed. Keep this one-line-command in your notes:
sed -e '/^ *#/d' -e '/^$/d' /etc/httpd/conf/httpd.conf
We're telling the sed command to display a file to STDOUT after performing
two edits (-e) on the output stream. The first one deletes all lines that
start with a pound sign (#), and the second edit deletes all blank lines.
These deletes are not changes to the file itself! All that is changed is
the data sent to STDOUT.