1

Here's the original post on Serverfault:

The first 15 lines of my 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
Include conf.modules.d/*.conf

Notice that the first time an external file is inserted is at the Include conf.d/*.conf line. And, the first file included is awstats.conf since it is alphabetical.

The first lines of awstats.conf are:

Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"

So, the first Alias & ScriptAlias encountered are essentially after 16 lines since apache starts loading conf files. Yet, I still get the error that "The Alias directive will probably never match because it overlaps an earlier Alias".

How can it overlap since no other ALIAS directive has been included so far? What am I missing?

EDIT:

Running systemctl status httpd results in the error mentioned:

The Alias directive in /etc/httpd/conf.d/awstats.conf at line 3 will probably never match because it overlaps an earlier Alias.
The Alias directive in /etc/httpd/conf.d/awstats.conf at line 4 will probably never match because it overlaps an earlier Alias.
The Alias directive in /etc/httpd/conf.d/awstats.conf at line 5 will probably never match because it overlaps an earlier Alias.
The ScriptAlias directive in /etc/httpd/conf.d/awstats.conf at line 6 will probably never match because it overlaps an earlier ScriptAlias.
  • Do any of the *.conf files have Include lines? – Mark Plotnick Mar 10 '15 at 19:46
  • if your original question on Server Fault is likely to be closed (or even deleted), please give the full context in this question. if it not going to be closed, why do you cross-post? – umläute Mar 10 '15 at 19:52
  • @MarkPlotnick just httpd.conf has the Includes. All the other ones do not. Although I did not check in /conf.modules.d – fizzy drink Mar 10 '15 at 20:09
  • httpd.apache.org/docs/current/mod/mod_info.html#startup to get the actual config Apache is looking at. That will probably make it clear what is going on. – derobert Mar 10 '15 at 20:42
  • 2
    @derobert OMG!!!! FINALLY!!! It was not an Include, it was a Stupid IncludeOptional in the httpd.conf down the file. That's WHY I couldn't find it. Stupid IncludeOptional !!! Thanks and please answer so I can accept – fizzy drink Mar 14 '15 at 16:03
4

From your grep results showing no other conflicting Aliases, the most likely explanation is that somehow you've got the file included twice. Look for any additional Include or IncludeOptional directives. (Especially this might occur on a 2.2→2.4 upgrade, as IncludeOptional is new.)

The other troubleshooting tip to deal with similar problems is that mod_info can be made to dump the config on startup which should show the full config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.