Skip to main content

Posts

Showing posts from January, 2017

Apache and backslashes in comments

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.  # ///// 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

Resetting Apache after a macOS update

Anyone who has been using a Mac for long enough to weather an update or two, and is also running a custom configuration of Apache , knows the "joy" of having to put everything back together again after each update. With each system update something about Apache is invariably updated and any custom configuration will no-longer be in place.  Granted, Apple is kind enough to make backups of the existing configuration files that are being overwritten.  But it's still a hassle to traipse through all the settings files to put them all back together. Without going over docs to see what has changed and trying to determine if it's worthwhile replacing all the new conf files with their backups, there's this solution. Write a document that details each conf file and its corresponding settings.  The file will need to be religiously maintained, but when it comes time to put the server back together, it can just be reconstructed from the details in the well maintained do