Bug 8841 - ScriptAlias and mod_userdir conflict
Summary: ScriptAlias and mod_userdir conflict
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_userdir (show other bugs)
Version: 2.0.36
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-06 21:22 UTC by Anthony Schorer
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Proposed patch: Reverse the ordering of the mod_userdir and mod_alias hooks (531 bytes, patch)
2002-05-06 21:49 UTC, Joshua Slive
Details | Diff
Second part of patch (525 bytes, patch)
2002-05-06 22:18 UTC, Joshua Slive
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Schorer 2002-05-06 21:22:40 UTC
Setup:
mod_userdir enabled
userdir set to public_html (/home/user/public_html)
cgi directory scriptaliased (see below) (/home/user/cgi)

Description:
Prior to upgrading to 2.0.* (2.0.35 was my first step), ScriptAlias didn't
have a problem with the use of ~'s in the alias'd path (ex: ScriptAlias
/~user/cgi/ /home/user/cgi) In 2.0.35/36 though, apache's error log turns
up this:

[error] [client 129.74.157.255] File does not exist:
/home/user/public_html/cgi

For some reason, it thinks the cgi dir should be under the document root for 
that user.

If I remove the ~, all functions as I would expect. (Configuration file
available at http://warpedlight.com/~aschorer/httpd.conf)

Independently confirmed by at least 1 other user.
Comment 1 Joshua Slive 2002-05-06 21:49:10 UTC
Created attachment 1796 [details]
Proposed patch: Reverse the ordering of the mod_userdir and mod_alias hooks
Comment 2 Joshua Slive 2002-05-06 21:51:04 UTC
If you can, please give the attached patch a go and see if it fixes your problem.
Comment 3 Anthony Schorer 2002-05-06 22:11:59 UTC
After applying the patch and recompiling...

-=# ./apachectl start
httpd: apr_hooks.c:162: tsort: Assertion `0' failed.
./apachectl: line 192:   719 Aborted                 (core dumped) $HTTPD
./apachectl start: httpd could not be started

If you want the core, let me know :o
Comment 4 Joshua Slive 2002-05-06 22:18:45 UTC
Created attachment 1797 [details]
Second part of patch
Comment 5 Joshua Slive 2002-05-06 22:19:38 UTC
Sorry, my fault.  You also need to patch mod_userdir as I do in the second patch.
Give that a shot.
Comment 6 Anthony Schorer 2002-05-06 23:12:12 UTC
Appears to work 'correctly' now. Thanks :-)
Comment 7 Joshua Slive 2002-05-07 00:20:33 UTC
OK.  Thanks very much for the report.  This will be fixed in 2.0.37.