You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jean-Michel Vourgère <jm...@nirgal.com> on 2013/08/04 15:42:11 UTC

How to help users diagnose invalid # in DirectoryIndex?

People sometimes forget # is a valid character and not a comment starter if not
at the begining of a line.

I've had a report of someone using a configuration like:
  DirectoryIndex index.html index.shtml index.cgi index.pl #index.php index.xhtml
then requiring that apache -t should warn about # in the middle of a line.

While I disagree about the # warning, that invalid configuration is not obvious
to diagnose. Error log will contain things like:
[Sun Aug 04 14:26:34.446796 2013] [core:error] [pid 28134:tid 3019877184] [client ::1:59082] AH00125: Request exceeded the limit of 10 subrequest nesting levels due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I think having a directory index url starting with # doesn't make sense.

Don't you think it would be a good idea to forbid that? [patch attached]
Or at least to issue a warning?
Or at least in a mod_dir check_config hook for -t usage?