Bug 1278910 - [PATCH] if mod_autoindex is disabled, allow default httpd.conf to still load
[PATCH] if mod_autoindex is disabled, allow default httpd.conf to still load
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
24
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Kaluža
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 12:59 EST by Pat Riehecky
Modified: 2016-03-18 11:01 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-18 11:01:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix (2.36 KB, text/plain)
2015-11-06 12:59 EST, Pat Riehecky
no flags Details

  None (edit)
Description Pat Riehecky 2015-11-06 12:59:17 EST
Created attachment 1090751 [details]
Patch to fix

Description of problem:
If you disable mod_autoindex apache complains about all 'Options Indexes' lines as there is no longer an Indexes option.

The attached patch simply asks apache to check if mod_autoindex is enabled before attempting to apply the Indexes option.

Version-Release number of selected component (if applicable):httpd-2.4.17-3.fc24


How reproducible:100%


Steps to Reproduce:
1.install httpd
2.disable autoindex, but change nothing else
3.attempt to start httpd
4.start fails

Actual results:
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: failed (Result: exit-code) since Fri 2015-11-06 11:54:46 CST; 5s ago
  Process: 10421 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 10419 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 10419 (code=exited, status=1/FAILURE)

Nov 06 11:54:46 testify.fnal.gov httpd[10419]: AH00526: Syntax error on line 16 of /etc/httpd/conf.d/autoindex.conf:
Nov 06 11:54:46 testify.fnal.gov httpd[10419]: Invalid command 'IndexOptions', perhaps misspelled or defined by a module not incl...uration
Nov 06 11:54:46 testify.fnal.gov systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Nov 06 11:54:46 testify.fnal.gov kill[10421]: kill: cannot find process ""
Nov 06 11:54:46 testify.fnal.gov systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 06 11:54:46 testify.fnal.gov systemd[1]: Failed to start The Apache HTTP Server.
Nov 06 11:54:46 testify.fnal.gov systemd[1]: Unit httpd.service entered failed state.


Expected results:
Service starts

Additional info:
Comment 1 Jan Kurik 2016-02-24 08:55:10 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 2 Joe Orton 2016-03-18 11:01:14 EDT
Thanks for the submission, Pat.

I dislike making changes like this, although upstream have headed towards making much of the default config conditional already.  We *could* do the same thing e.g. for Require too, in case somebody wanted to run without mod_authz_host.  Where should we stop?

Any time we make such changes, it makes the default config a bit harder to read (and more confusing) for 99.9% of users, to benefit 0.01% of users.  It also makes it a little bit harder to maintain the config, the further we deviate from upstream

I'm generally happy with the idea that removing base modules (i.e. 00-base.conf) might cause the server to fail to start in the default httpd.conf.  Admins should feel free to throw away the default config if required!

Note You need to log in before you can comment on or make changes to this bug.