0

I've set up an apache2 (Apache/2.2.16) on a VirtualBox (4.2.6) driven Debian (6.0.6) running on a Mac OS 10.7 host system. I mount a shared folder by fstab with the following configuration:

htdocsshare /home/dev/htdocsshare vboxsf defaults,uid=1000,gid=1000 0 0

The mount works fine, the default user (dev, 1000) has read and write permissions. I run the apache as this user (dev, 1000 – and yes, I know, that has a bad taste, but I don't really think thats the problem here).

I've set up a catchall vhost, with DocumentRoot set to /home/dev/htdocsshare (no further settings changed). Apache displays the files and folders in there correct, but when trying to open a file, it serves garbage content. Sometimes it looks like shell script or something like that, as I can recognize messages with variable placeholders.

Opening the files on the mount with vi/vim also works fine. But even if i touch and modify a file within the guest system, apache reads garbage characters. Does anyone have a hint or know what the problem is? Google didn't tell me much, but I don't really know what to search for. Thanks.

Edit: I recognized, the content changes from time to time and not reproducible. Here is something it delivers me for an apache error-log (from another server).

enter image description here


Chetan Bhargava
  • 245
  • 5
  • 15
cem
  • 103
  • 4

1 Answers1

2

Two features the vboxsf may not support: mmap and sendfile. Try adding these to your apache config:

EnableMMAP off
EnableSendfile off
Mark Wagner
  • 18,019
  • 2
  • 32
  • 47