Answer the question
In order to leave comments, you need to log in
Apache running under VirtualBox does not give some files when connecting from the host side
Environment, just in case:
Apache 2.2.20 is running on Ubuntu server 11.10 x86 under VirtualBox 4.1.4 Host - Win7 x64.
Between axes the network bridge is raised.
DocumentRoot for Apache under Ubuntu is a mounted directory, which is a directory with files for wines (shared using VirtualBox).
Problem:
when you try to open one of the projects, some of the images in it are not loaded. And the other - having exactly the same address, only the file name is different - is loaded. That is:
servername/project/templates/default/images/userpic.png - not loaded
servername/project/templates/default/images/new.png - loaded
At the same time, all files, of course, are in place. The rights are correct everywhere.
Here's what's in the Apache access.log:
At the same time, Apache gives all the files correctly if the request is local
Oh yes, just in case: I cleared the cache :-)
192.168.0.111 - - [07/Nov/2011:03:50:35 +0400] "GET /project/templates/default/images/new.png HTTP/1.1" 200 511 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
192.168.0.111 - - [07/Nov/2011:03:50:50 +0400] "GET /project/templates/default/images/userpic.png HTTP/1.1" 200 291 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
Answer the question
In order to leave comments, you need to log in
I recently dealt with this topic. After long tests, I found the problem in the VirtualBox extensions. When Apache works through mounted virtual directories, it gives files to some kind of broken ones, I could not fix, read or perform other actions - everything rests on virtualbox.
(as I understand it, you need more space for hosting)
I had 2 solutions:
1) create another VHD with a large partition and upload it there.
2) create a true network folder, and mount it through a network bridge bypassing virtualbox. (didn't test it, but I'm sure it would work)
I chose the first option, since I have a high degree of supervisor security and I reject any requests from virtual machines.
PS: Bring a friend))). I have an absolutely identical system of work on my home server, except that I have debian and wines. dreampark server.
For a very long time, the code of the built-in SMB server (through which the built-in file sharing of the host system inside the guest system is organized) is crooked and buggy, bugs hang for years and are not fixed. It's all about data caching, as I understand it.
The best advice I can give is to not use this mechanism.
ps if you have linux in the virtual machine, guest windows - try going to colinux.org
it is based on user mode linux technology, when no processor virtualization occurs, and the equipment is emulated through the colinux kernel ... what am I talking about? the local built-in folder sharing mechanism was not buggy for me a year or two ago.
Linux itself is transferred stupidly backup / restore. of the shortcomings, xorg is needed for windows (there are ready-made portable colinux assemblies)
How is the network configured between host and VM? The assumption is purely from the category of telepathy, but I see a problem with MTU.
I use a bunch of VirtualBox (Ubuntu Server 10.04 LTS) on Win7 x64. 2 interfaces are raised on the virtual machine: NAT and HostOnly
I keep all project files in the virtual machine, and I access them from Windows via Samba.
IMHO, the most “correct” way in terms of the absence of hemorrhoids and, as a bonus, it’s convenient to backup.
If problems with VirtualBox cannot be solved, I advise you to try colinux. There is a ready-made debian image for it, in which you can easily deploy everything you need. And it will be faster.
I advise you to look here httpd.apache.org/docs/2.0/mod/core.html#enablesendfile
For NFS or SMB mounted files, this feature may be disabled explicitly for the offending files
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question