Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

192.168.0.55 - - [25/Jun/2009:20:10:41 -0400] "GET /images/pic.png HTTP/1.1" 302 220

Now, if I refresh the page it loads.

192.168.0.55 - - [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
add comment

3 Answers

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
add comment

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 192.168.0.7

192.168.0.7 is the ip of the host pc

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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