Bug 11760

Summary: default httpd.conf breaks web app that uses ScriptAlias
Product: Mageia Reporter: Barry Jackson <zen25000>
Component: RPM PackagesAssignee: Guillaume Rousse <guillomovitch>
Status: RESOLVED INVALID QA Contact:
Severity: critical    
Priority: Normal Keywords: Triaged
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: apache-2.4.6-5 CVE:
Status comment:

Description Barry Jackson 2013-11-25 20:56:28 CET
Description of problem:
If /etc/httpd/sites.d/foo.conf contains a ScriptAlias it is ignored because "Include conf/sites.d/*.conf"  is currently at the end of httpd.conf.
The Include needs to be placed before the default ScriptAlias.

http://httpd.apache.org/docs/2.4/mod/mod_alias.html#order

Moving the Include to just before the line:
<IfModule alias_module>
fixes an issue that I have been having with a new release of ZoneMinder that I am working on.
Not sure if there may be other side-effects. 

--- httpd.conf_orig     2013-11-25 18:18:04.834574951 +0000
+++ httpd.conf  2013-11-25 19:44:07.058399916 +0000
@@ -215,6 +215,9 @@
     CustomLog "logs/access_log" combined
 </IfModule>
 
+# Include sites configuration
+Include conf/sites.d/*.conf
+
 <IfModule alias_module>
     #
     # Redirect: Allows you to tell clients about documents that used to 
@@ -346,5 +349,3 @@
 # Include generic server configuration
 Include conf/conf.d/*.conf
 
-# Include sites configuration
-Include conf/sites.d/*.conf

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-11-25 23:46:43 CET

Keywords: (none) => Triaged
Assignee: bugsquad => guillomovitch

Comment 1 Guillaume Rousse 2013-11-27 09:42:02 CET
Redefining a path already defined previously in the configuration won't work, and this is an expected behaviour. As discussed on IRC, the actual problem is the zoneminder default configuration, not in the file inclusion order in apache configuration.

Status: NEW => RESOLVED
Resolution: (none) => INVALID