Apache on CentOS guest wont serve OSX static files

Discussion in 'Linux Virtual Machine' started by EthanM, Oct 22, 2010.

  1. EthanM

    EthanM Bit poster

    Messages:
    2
    Hi, This may sound like an Apache config question - but I'm reasonably sure that config is ok.

    I have my OSX home folder mounted under /media/psf - I can access the files there, and I have an apache alias pointing to files there.

    The odd thing is that if I create a new file (eg. echo 'test' > test.js) - I can view it via apache just fine (eg. http://<centos-ip>/media/test.js) However, other files won't work (Apache apprently responds with a 200 for the request, but the transfer fails), eg:

    ~$ curl http://pgevr/media/navagation_menu.js
    curl: (18) transfer closed with 702 bytes remaining to read

    The permissions/ownership are exactly the same on the two files - but one just wont work.

    I have a much more thorough version of this posted here: http://serverfault.com/questions/193553/apache-on-parallels-centos-fails-to-read-osx-host-files but I thought there might some Parallels-specific issues this forum might know.

    BTW selinux is already disabled

    Thanks
     
  2. eljefe

    eljefe Bit poster

    Messages:
    3
    I'm having this same exact issue with Debian 5.0 as my guest OS. Apache2 won't serve static files (though it will execute my PHP scripts in the /media/psf mount) and most get reported as HTTP status 206.

    Previously I had my system working by using AutoFS to auto-mount an sshfs mount, however I didn't like this solution and would really like to use the parallels shared folder.
     
  3. EthanM

    EthanM Bit poster

    Messages:
    2
    UPDATE : A user comment on the serverfault posting had the answer:

    Adding "EnableSendfile Off" to the <Location> stanza for the media folder fixed the issue. A quote from the Apache documentation:

    -- http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile

    Hope this helps
     
  4. eljefe

    eljefe Bit poster

    Messages:
    3
    EnableSendfile Off did not work for me, still had the same issue.
     
  5. eljefe

    eljefe Bit poster

    Messages:
    3
    Please click one of the Quick Reply icons in the posts above to activate Quick Reply.
     

Share This Page