Bug 158225

Summary: httpd -S (show settings) provides no output
Product: [Fedora] Fedora Reporter: Andrew Taylor <ataylor>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.0.54-10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-05 14:13:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Taylor 2005-05-19 18:30:45 UTC
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
the terminal.

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"

Comment 1 Joe Orton 2005-05-20 14:34:20 UTC
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.

Comment 2 Andrew Taylor 2005-05-20 16:40:19 UTC
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?

Comment 3 Joe Orton 2005-09-05 14:13:16 UTC
Yes, this is caused by the SELinux policy; in fact in FC4 the policy was relaxed
so this does work by default.