You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rainer Jung <ra...@kippdata.de> on 2009/05/14 23:59:12 UTC

Working directory, piped logs and relative paths

I noticed some differences between Unix and Windows way of handling
piped loggers I wanted to give notice of:

Both platforms use a shell resp. cmd.exe to start the piped logger. In
principle both allow to use a relative path for the log program.

On Unix the working directory of the httpd processes is "/" (like for
any good daemon), so any relative path containing a slash is interpreted
relative to "/" and thus isn't really useful. The only non-absolute
paths that are nice are the ones without slashes, because they are
searched for by the shell in PATH.

On Windows the working directory of the httpd processes is the current
directory when started not as a service and the server root when started
as a service. Especially the latter makes it nice to use relative paths
in piped loggers. Using the current directory for the non-service httpd
is somehow a surprise, because it means that the interpretation of a
relative logger path in the config depends on the current shell
directory at the moment the web server is started. Of course, most
Apaches on Windows run as a service.

Regards,

Rainer