Ok, not sure why this is occuring.
So, I get the message
The Alias directive in /etc/httpd/conf.d/awstats.conf at line 3 will probably never match because it overlaps an earlier Alias.
and
The Alias directive in /etc/httpd/conf.d/welcome.conf at line 18 will probably never match because it overlaps an earlier Alias.
but here are the first 15 lines of my /httpd/httpd.conf
file
ServerSignature Off
ServerTokens Prod
ServerRoot "/etc/httpd"
Listen *:80
Listen *:443
User apache
Group apache
ServerAdmin hostmaster@localhost
ServerName 192.168.1.200:80
Include conf.d/*.conf <- THIS IS WHERE INCLUDES BEGIN
Include conf.modules.d/*.conf
There are absolutely no Alias or ScriptAlias
entries before line 14, which is the Include conf.d/*.conf
.
So, in reality, the first time an Alias
entry is encountered, is in fact in the awstats.conf
file under /conf.d/*.conf
.
Why is it that I am getting this error then?
The server runs, it's just an annoyance.
EDIT: did grep Alias on /etc/httpd/conf.d/*.conf
and here are the results ->
/etc/httpd/conf.d/awstats.conf:Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
/etc/httpd/conf.d/awstats.conf:Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
/etc/httpd/conf.d/awstats.conf:Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
/etc/httpd/conf.d/awstats.conf:ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"
/etc/httpd/conf.d/welcome.conf:Alias /.noindex.html /usr/share/httpd/noindex/index.html
/etc/httpd/conf.d/welcome.conf:Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
/etc/httpd/conf.d/welcome.conf:Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
/etc/httpd/conf.d/welcome.conf:Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
/etc/httpd/conf.d/welcome.conf:Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png
Best Answer
The easiest to understand is that Apache generates a single configuration file internally, by parsing the main httpd.conf line by line and includes the external sections at the locations where the
Include
or theIncludeOptional
directive is used, before continuing with the next line.When wildcards are used in
Include
file-system paths the includes are parsed in lexicographical (dictionary) order,conf.d/alice.conf
will come beforeconf.d/bob.conf
.With many directives order matters, with some the last occurrence is used, with others a greater scope before a smaller scope will win etc.
The rules for the Alias directive are:
For troubleshooting a good first start in your case is a simple
grep -E "Alias|Redirect" conf.d/*.conf