Parallels虚拟服务器是CentOS 5.5,主机系统是OSX Snow Leopard
在CentOS中,挂载主机文件系统:
none /media/psf prl_fs sync,nosuid,nodev,noatime,share 0 0
Apache在CentOS中运行,并具有指向主机文件系统的以下别名
Alias /ca_media /home/django/soft-link-via-media-psf/media <Location "/ca_media"> SetHandler None ExpiresActive on ExpiresDefault "access plus 1 week" FileETag MTime Size </Location>
在这一点上,它从主持人这里是一个示范。 似乎有些文件不会得到服务 – 但其他人会。 我看不出两者之间的区别(请注意,“pgevr”是我在/etc/hostsconfiguration的CentOS机器的名称):
~/Projects/er_trunk/media/er/js$ ls -l navagation_menu.js -rw-r--r-- 1 millere staff 702 Sep 21 2009 navagation_menu.js ~/Projects/er_trunk/media/er/js$ curl http://pgevr/ca_media/er/js/navagation_menu.js curl: (18) transfer closed with 702 bytes remaining to read ~/Projects/er_trunk/media/er/js$ echo 'foo' > bar.js ~/Projects/er_trunk/media/er/js$ curl http://pgevr/ca_media/er/js/bar.js foo ~/Projects/er_trunk/media/er/js$ ls -l bar.js -rw-r--r-- 1 millere staff 4 Oct 21 11:51 bar.js ~/Projects/er_trunk/media/er/js$ file navagation_menu.js navagation_menu.js: ASCII text ~/Projects/er_trunk/media/er/js$ file bar.js bar.js: ASCII text ~/Projects/er_trunk/media/er/js$ cp navagation_menu.js bar.js ~/Projects/er_trunk/media/er/js$ curl http://pgevr/ca_media/er/js/bar.js curl: (18) transfer closed with 702 bytes remaining to read
这是一个与两个文件系统或挂载的文件系统types有关的问题吗? 你将如何调查?
[编辑..这里是失败的curl请求与 – 跟踪ascii的结果]
~/Projects/er_trunk/media/er/js$ curl --trace-ascii - http://pgevr/ca_media/er/js/navagation_menu.js == Info: About to connect() to pgevr port 80 (#0) == Info: Trying 10.211.55.9... == Info: connected == Info: Connected to pgevr (10.211.55.9) port 80 (#0) => Send header, 154 bytes (0x9a) 0000: GET /ca_media/er/js/navagation_menu.js HTTP/1.1 0031: User-Agent: curl/7.19.6 (i386-apple-darwin10.0.0) libcurl/7.19.6 0071: zlib/1.2.3 007e: Host: pgevr 008b: Accept: */* 0098: <= Recv header, 17 bytes (0x11) 0000: HTTP/1.1 200 OK <= Recv header, 37 bytes (0x25) 0000: Date: Fri, 22 Oct 2010 16:51:19 GMT <= Recv header, 31 bytes (0x1f) 0000: Server: Apache/2.2.3 (CentOS) <= Recv header, 46 bytes (0x2e) 0000: Last-Modified: Thu, 21 Oct 2010 21:55:19 GMT <= Recv header, 27 bytes (0x1b) 0000: ETag: "2be-4932794f5ffc0" <= Recv header, 22 bytes (0x16) 0000: Accept-Ranges: bytes <= Recv header, 21 bytes (0x15) 0000: Content-Length: 702 <= Recv header, 31 bytes (0x1f) 0000: Cache-Control: max-age=604800 <= Recv header, 40 bytes (0x28) 0000: Expires: Fri, 29 Oct 2010 16:51:19 GMT <= Recv header, 19 bytes (0x13) 0000: Connection: close <= Recv header, 40 bytes (0x28) 0000: Content-Type: application/x-javascript <= Recv header, 2 bytes (0x2) 0000: <= Recv data, 0 bytes (0x0) == Info: transfer closed with 702 bytes remaining to read == Info: Closing connection #0 curl: (18) transfer closed with 702 bytes remaining to read
我有同样的问题,取消注释在/etc/httpd/conf/httpd.conf EnableSendfileclosures为我工作(由上面的线程Deutchbuild议)。