Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I am using a virtual pc to test my website.

I can access all my webpages on the virtual pc.

However, images don't load correctly.

I can browse to my images folder and view all of them. However, if I click an image it will not load, and the apache log shows the virtual pc's ip trying to view the image: - - [25/Jun/2009:20:10:41 -0400] "GET /images/pic.png HTTP/1.1" 302 220

Now, if I refresh the page it loads. - - [25/Jun/2009:20:10:51 -0400] "GET /images/bg.png HTTP/1.1" 200 214

Also, images won't load in html or css. It seems like a redirecting problem or something, but I have no clue how to fix it.

Thanks for any advice

share|improve this question
Did you fix the issue? – Joshua Nurczyk Jul 2 '09 at 19:24

Well the fact that it's running on virtual PC isn't likely to be relevant.

I think the question is why are you being served a redirect (302) the first time. This sounds like a webserver config issue to me.

share|improve this answer

The top navigation bar shows that it is trying to access http://localhost/images

I have set in the host file of the virtual pc:

thewebsite is the ip of the host pc

share|improve this answer

Looking at the info you provided, this is unrelated to the fact it is a virtual machine and more of a configuration problem on the webserver.

share|improve this answer

Your Answer


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