Apache httpd seems to have an issue that flusters the configuration file parser when a series of backslashes are present in a comment.
The following snippet is taken from a vhosts configuration file. Notice the 5 backslashes at the end of the first line.
With these backslashes present, an attempt to start the server will report the following error.
The problem doesn't appear until the third backslash in a row. A reasonable assumption is that these backslashes are confusing the parser in terms of line endings. For example, \\\\r\n.
It should also be noted that this is happening on the Windows version of httpd, but it may be the case for other systems as well.
The following snippet is taken from a vhosts configuration file. Notice the 5 backslashes at the end of the first line.
# ///// Be sure to manage the corresponding [wrap]
directory block in [wrap]
httpd-directories.conf \\\\\
<VirtualHost *:80>
ServerAdmin webmaster@domain.tld
ServerName server.domain.tld
DocumentRoot "/path/to/server.domain.tld"
ErrorLog "/path/to/server.domain.tld-error.log"
CustomLog "/path/to/server.domain.tld-access.log" common
</VirtualHost>
With these backslashes present, an attempt to start the server will report the following error.
</VirtualHost> without matching <VirtualHost> section
The problem doesn't appear until the third backslash in a row. A reasonable assumption is that these backslashes are confusing the parser in terms of line endings. For example, \\\\r\n.
It should also be noted that this is happening on the Windows version of httpd, but it may be the case for other systems as well.
Comments
Post a Comment