Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Parallels virtual server is CentOS 5.5, host system is OSX Snow Leopard

Within CentOS the host filesystem is mounted:

none          /media/psf   prl_fs   sync,nosuid,nodev,noatime,share     0       0

Apache is running within CentOS, and has the following alias pointing to the host filesystem

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

It gets bizzare at this point, from the host here is a demonstration. It seems that some files just won't get served - but others will. I can't see any distinction between the two (note that "pgevr" is my name for the CentOS machine as configured in /etc/hosts):

~/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
~/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

Is this a problem having to do with the two filesystems, or the type of mounted filesystem? How would you investigate this?

[ EDIT .. here is the result of the failed curl request with --trace-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 == Info: connected
== Info: Connected to pgevr ( 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: */*
<= 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)
<= 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
share|improve this question
Are there any errors in the Apache logs after your curl attempt fails? – Deutsch Oct 25 '10 at 16:55
@Deutsch When I encounter the problem there are no errors, just logs of a bunch of either 200 or 206 requests. E.g. trying to view /images/ssl.gif fails and this is the only log line I can see: domain:80 - - [25/Oct/2010:12:31:03 -0500] "GET /images/ssl.gif HTTP/1.1" 200 2432 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.11 Safari/534.10" – dcousineau Oct 25 '10 at 17:31
Yep, my Apache logs look like that as well. In the --trace-ascii output above you can see the 200 header come back as well... – EMiller Oct 26 '10 at 13:39
It could be an issue between what features linux supports for that filesystem and what Apache is trying to do. Try adding "EnableSendfile Off" to your Apache config. More info is available at – Deutsch Oct 26 '10 at 17:33
Deutsch sir, that was it! Please add an answer to claim the points that are rightfully yours. – EMiller Oct 27 '10 at 17:14

I had the same problem and uncommenting EnableSendfile Off in /etc/httpd/conf/httpd.conf worked for me (as suggested by Deutch in a thread above).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.