DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36919>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36919 Summary: DocumentRoot must be absolute path or apache silently fails Product: Apache httpd-2.0 Version: 2.0.54 Platform: PC URL: http://httpd.apache.org/docs/2.0/mod/core.html#documentr oot OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I think this bug can be handled by updating the documentation, but in truth it's a coding error. I believe the core issue is that DocumentRoot is not being interpreted relative to ServerRoot. consider this in my conf/httpd.conf: DocumentRoot htdocs $ ./httpd -d `pwd` -k start ==> httpd will exit with status 0 and fails to start. The problem is that DocumentRoot is checked relative to the current working directory when the config file is being parsed (so you do not get the "DocumentRoot must be a directory" error). Then, before forking the daemon, the main process does a chdir("/"). Now the the directory is no longer found and this causes the daemon to exit. What is particularly nasty about this failure is that 1. nothing gets logged to ErrorLog or the console 2. the httpd process exits with exit status 0! The daemon tries to log an error message but its futile attempts to write errors to the console happen after stdout and stderr have been redirected to /dev/null. I'd like to see one of these two changes made: 1. DocumentRoot is changed to be relative to ServerRoot when it does not start with a leading / 2. a note added to the DocumentRoot documentation stating that it must be a fully qualified path. Personally I'd prefer #1, but I think #2 is a reasonable solution. The reason I prefer #1 is that I'd like to be able to create config files which are completely independent of installation location. Whether it's in /etc/httpd, /usr/local/apache2, or /home/mike/httpd, it should not matter as long as I specify -d `pwd`. Of course, I'd like to see the current working directory made to be the default server root, but that may be asking too much :-) thanks for listening, mike -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
