Help with autoindex on; missing slash for directories
mdounin at mdounin.ru
Thu Jul 2 23:22:52 MSD 2009
On Thu, Jul 02, 2009 at 11:01:40AM -0700, Yazz Atlas wrote:
> On 7/1/09 3:53 PM, Maxim Dounin wrote:
>> I mean *appeared* in 0.7.40, i.e. problem exists in 0.7.40 but not
>> in 0.7.39. But after some thinking it's most likely 0.7.15 when
>> dirent.d_type checking was initially introduced (i.e. problem exists in
>> 0.7.15 but not in 0.7.14).
> Ah, gotcha. I miss understood.
>>> checking for struct dirent.d_namlen ... not found
>>> checking for struct dirent.d_type ... found
>> You system has dirent.d_type, but it looks like it's something
>> wrong with it. I've tried to reproduce problem on vmware image of
>> CentOS 5.3 i386 - but failed, everythings works ok. I've even
>> tried initial release version and fully updated one (with
>> 2.6.18-128.1.16.el5 kernel), no problems found.
>> It's either x64 only issue, or something wrong with headers on
>> your server(s). Unfortenately I have no x64 version on hand to
>> test it there, but people report that everything is ok at least on
>> other x64 distributions.
> I tested under VMware Server Version 2.0.1 and selecting Red Hat
> Enterprise Linux (64bit) as the Guest Operating System. Then I loaded
> CentOS release 5.3 (Final) x86_64 with Kernel 2.6.18-128.1.14.el5.
> The problem still exists.
>> Could you please check your headers, most notably
>> /usr/include/dirent.h and /usr/include/bits/dirent.h?
> I attached them in the file called include-dirent-x86_64.tar.gz.
Looks good, I see nothing unusual there.
Could you please compile nginx with the attached simple patch and
obtain debug log for autoindex request?
-------------- next part --------------
diff -r 1191e3250e60 src/http/modules/ngx_http_autoindex_module.c
--- a/src/http/modules/ngx_http_autoindex_module.c Mon Jun 22 00:00:00 2009 +0400
+++ b/src/http/modules/ngx_http_autoindex_module.c Thu Jul 02 19:22:42 2009 +0000
@@ -278,7 +278,7 @@
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http autoindex file: \"%s\"", ngx_de_name(&dir));
+ "http autoindex file: \"%s\", type %d", ngx_de_name(&dir), dir.type);
len = ngx_de_namelen(&dir);
More information about the nginx