Red Hat Bugzilla – Bug 158225
httpd -S (show settings) provides no output
Last modified: 2007-11-30 17:11:06 EST
Running "httpd -S" to diagnose virtual host errors doesn't provide any output.
This is related to bug 145822 and is caused by SELinux restrictions on accessing
A work around is to pipe stderr through cat: "httpd -S 2>&1 | cat".
It would be nice if Fedora Core provided an alternate way to run httpd
interactively, without swallowing output. e.g. "apachectl showsettings"
I'd rather not change the apachectl interface vs upstream. Would e.g.
"service httpd dumpconfig"
be OK? I think this would probably be useful.
That would be ok for me. One problem with this solution (and the apachectl fix,
too) is that it isn't very discoverable. Someone familiar with apache, or
having read the apache docs, will try "httpd -S" and expect it to work. And
without console output, it isn't possible to redirect them to an alternative.
Maybe the bug is really part of the SELinux policy? Can it not allow httpd to
output to the terminal if started with interactive commandline parameters?
Yes, this is caused by the SELinux policy; in fact in FC4 the policy was relaxed
so this does work by default.