[Bug 63079] New: Add a debug line if Directory instruction provides an invalid path

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63079] New: Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

            Bug ID: 63079
           Summary: Add a debug line if Directory instruction provides an
                    invalid path
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

`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'

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #1 from mordax <[hidden email]> ---
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?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #2 from Christophe JAILLET <[hidden email]> ---
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 [hidden email] 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 :)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

Christophe JAILLET <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from Christophe JAILLET <[hidden email]> ---
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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #4 from mordax <[hidden email]> ---
(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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #5 from Christophe JAILLET <[hidden email]> ---
(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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #6 from [hidden email] ---
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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #7 from [hidden email] ---
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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

William A. Rowe Jr. <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #8 from mordax <[hidden email]> ---
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?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #9 from [hidden email] ---
Mordax, are you still working on this improvement?
If not, I plan to spend some time on it.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63079] Add a debug line if Directory instruction provides an invalid path

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63079

--- Comment #10 from [hidden email] ---
Created attachment 36960
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36960&action=edit
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 [hidden email]
    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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]