1

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

1
1

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.

0

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy