Alex Rivera | Logout

Shared folder in VirtualBox for Apache

Asked 2011-06-09T20:37:32.460
30

My host machine is ArchLinux and I'm running Apache in a CentOS guest. I have the vhost configuration and all the site code in a shared folder. To be able to put the vhost configuration in a shared folder I mounted the shared folder as apache:apache.

shared    /mnt/shared    vboxsf    defaults,uid=48,gid=48  0 0

When I'm editing files in the host, Apache will consistently start sending old versions of the file with trailing characters. In vim, they show up as ^@, so I guess they're null characters. The number of null characters is related to the number of changes I make even if I edit the first line, null characters show up at the end. If I were to speculate, it looks like a bad diff.

If I stop httpd, umount, remount, and start httpd the file looks fine. Just restarting httpd doesn't help.

How would I go about debugging the mount? Nothing jumped out at me in /var/log.

Edit
Report

1 Answer

1

On lighttpd the solution is to add the below line to lighttpd.conf

server.network-backend = "writev"

See: Lighttpd broken when serving from Virtualbox shared folder

answered 2012-12-27T14:03:31.740

Your Answer