`apachectl -t` should provide an info at 'debug' level if the path for <Directory> directive does not exist. For example, given <Directory /var/www/demo>, if /var/www/demo does not exist, `apachectl -t -e DEBUG` does not complain (tested with v.2.4.37). It would display something like AH00112 for DocumentRoot: 'Warning: DocumentRoot [/var/www/demo] does not exist' so it would be: 'Debug: Directory /var/www/demo does not exist'
I'd like to work on this - however I am new to the project. Would you folks recommend this bug as something that a newcomer can tackle?
Hi mordax, yes this looks like a good candidate to start with. - Should be easy enough to get fast and visible results - Low risk, just a debug message added - Helpful to spot potential configuration issues (typo, ...) In other work, perfect for a first try. You should work on the 'trunk' branch as any patch has to go there first. Do not hesitate to discuss on dev@httpd.apache.org for whatever help or explanation you need. If not already done, first download code via svn, configure your build environment, build from source. Once you can get your own build server, you can start to change/fix/improve things. Some docs are available for all that, but the new eye of a newcomer is always welcomed to improve our documentation. So whatever looks missing, unclear, spurious, not working, please report it. It will be appreciated. Welcome on board and happy hacking :)
mordax: My comment #1 has not been mailed to you., so I've added you on the CC list of this bug so that you can receive any update.
(In reply to Christophe JAILLET from comment #2) Hi Christophe, > Welcome on board and happy hacking :) Thanks for the warm welcome, I'm looking forward to helping out! I appreciate the clarification on the steps - I've been reading the docs but it's always nice to have confirmation that you've understood correctly. And thanks, I'll reach out for help if I need it. Out of curiousity, would you recommend the Apache IRC channel for quick questions, or is it less active than the mailing list? > Some docs are available for all that, but the new eye of a newcomer is > always welcomed to improve our documentation. Of course, speaking as a sad Windows developer, I'm no stranger to documentation improvements. ;) Happy to help out.
(In reply to mordax from comment #4) > Out of curiousity, would you recommend the Apache IRC channel for quick > questions, or is it less active than the mailing list? IRC is obviously more reactive, ... but it depends of who is online. Mailing list is slower, ... but the audience is wider. Personally, I nearly never use IRC. Some others are always connected (even if not always behind their keyboard :) ). Try out and make your own opinion. I propose to you to switch to one (or both) of these 2 channels, in order not to hijack too much this report.
I started to work on a patch after sending the bug report. Currently, I guess the patch should include a call to ap_log_error(APLOG_MARK, APLOG_DEB, ...) around line 2374 in core.c. (I used last archive of released apache to get a try). However, I don't plan to contribute more to Apache in the future. So if mordax wants that, I think it's better if he does the patch.
I started to work on a patch after sending the bug report. Currently, I guess the patch should include a call to ap_log_error(APLOG_MARK, APLOG_DEB, ...) around line 2374 in core.c. (I used last archive of released apache to get a try). However, I don't plan to contribute more to Apache in the future. So if mordax wants that, I think it's better if he does the patch. Currently, I stopped to work on it to avoid duplicate efforts.
Still gonna work on this bug, however my attempts at getting the server built using a x64 Windows machine alongside VS studio 2017 tooling has failed relatively miserably. I had a process for writing out potentially new documentation for it, but I'm most likely going to abandon in it favour of a Linux vm and just building it there. Unless there's a master who has it built and running perfectly from source on their Win machine in Apache?
Mordax, are you still working on this improvement? If not, I plan to spend some time on it.
Created attachment 36960 [details] print a warning if Directory directive is incorrect This is a patch to provide a Warning is the Directory value is not valid. For example: $ apachectl -t -f ~/src/httpd-trunk/demo/site.conf AH10229: Warning: <Directory "/x/y/z/"> does not exist or is not a directory AH10229: Warning: <Directory "/etc/hostname"> does not exist or is not a directory with '~/src/httpd-trunk/demo/site.conf' file contains: <VirtualHost 127.0.0.1:80> ServerAdmin admin@yaal.fr ServerName demo <Directory /x/y/z/> </Directory> <Directory /etc/hostname> </Directory> </VirtualHost> What do you think about it? Does it need some improvement to be merged? The patch is attached to this message.
Created attachment 37020 [details] print a warning if Directory directive is incorrect The new patch improves some details. Thanks to Christope about them! I don't see the warning message anymore but, currently, it's the same behavior with the previous patch so I guess the problem comes from the build, not with the patch: $ /home/stephane/bin/apache_trunk/bin/apachectl -t -f ~/src/httpd-trunk/demo/site.conf AH: AH: Syntax OK I plan to investigate on it.
Hi Stéphane, You added an extra comma after the APLOGNO().
Created attachment 37028 [details] print a warning if Directory directive is incorrect Thanks Christophe! This new patch fixes: - the message is properly displayed - there are no error if the path is correct
Created attachment 37062 [details] Updated patch with tag added According to docs/log-message-tags/README the update-log-msg-tags perl script should be run to find the next free tag. Diff updated with next free tag.
Thanks for the patch. Committed in 1876402 but I restricted it to run during an explicit configtest. I didn't want it appearing newly for people doing a routine stop/start -- maybe further discussion on dev@.