I switched my webserver from a physical to a virtual box (VMWare ESXI) and when I brought it back up whenever I tried to visit my site (in chrome) it would download the html instead of displaying it… it did that for several pages. I managed to get it to display one page… but then only some of the graphics loaded and the site seemed extremely slow.
When visiting the site in IE, it would either not load or it would be garbled beyond recognition. I checked the physical files and I don’t see anything wrong with them, they are all there…
I have phpmyadmin installed as well… but that won’t load either… chrome just tries to download it and IE won’t display anything. Same with my Redmine setup. I purged everything related to apache2 (I think) and started over, but it still has the same issue… is there something I’m missing??
WELCOME to SitePoint’s Apache forum!
What you’re experiencing is likely to be:
Incomplete setup of Apache on the Virtual computer (VMWare) (you didn’t say which OS). It’s NOT a VMWare problem but a failure to install it correctly, i.e., localhost, port 80, all the AddType handlers, PHP installation, etc.
DNS setup is incomplete as any virtual host on the virtual box requires the same setup as on your own computer as well as ADDING the network IP Address to visit your virtual host from your computer (192.168.x.y).
Most likely, it’s a combination of the two.
Okay, the setup is on debian and the reason I suspect vmware is because the setup was working before I cloned the drive and uploaded the image to vmware. I don’t know what could have changed. If something did change I hoped it would resolve with a purge/reinstall of Apache.
If it is a DNS problem why would some pages display(poorly and not load all images) and some pages just try and download? I will look up addtypes because it sounds like that could have something to do with it…
Clone from where (OS) to where (OS) within VMWare?
I think that 'nix requires a setup like WinDoze, i.e., you need to do more than copy the Apache files to start a service on a new computer - but the reinstall should have corrected that.
The DNS is a problem BETWEEN computers (remember, your virtual machine IS a different computer), not just the 127.0.0.1 for localhost.
The AddType would NOT be required for .htm(l) files, only for PHP which is not a default install on Apache. Ditto MySQL which should be installed as a service.
Sorry, let me explain the process better.
I took a physical debian box that had a working website served with apache (no issues with the website) and used clonezilla to create an image of the entire HDD.
I took that clonezilla image of the entire debian OS and uploaded it to my esxi datastore. I created a brand new VMware Virtual machine and booted the clonezilla disk on that VM and then restored that clonezilla image onto that brand new VM and booted the VM up.
So i was not copying the apache install, I was copying the entire OS…
I then added a nic card to my vmware esxi physical box and dedicated that NIC card to my new VM and gave it the exact same IP that my old physical box had.
The VM seemed to boot up with no issues, everything appeared to work until I tried to access my website… my main php page actually partially loads… but not all of the pictures load… only some of the pictures… and everytime you refresh it seems to randomly choose which pictures to load. When I click on one of the links to bring me to an html page it tries to download it in Chrome, or it displays gibberish in IE…
This is confusing me terribly, nothing seems to make sense. I took a look at the html code and it doesn’t seem to be malformed in any way shape or form… so very confused… any help would be very welcome.
While I’m not familiar with clonezilla, I’d have to guess that it does a copy and paste job adequately so I don’t know what might be going wrong. Other than checking (to confirm) all the Apache settings, DNS settings, etc, I don’t know where else to suggest you look.
Okay, I have managed to confirm that this is some sort of VMWare issue. I took the clonezilla image I had and restored that to a virtualbox VM running on my personal machine. Then my website worked perfectly without any issues. This is obviously a VMWare issue of some kind… a very strange one… I’ll post in the VMWare forums about it.
Thank you for that update! I hope they’ll be able to resolve that for you AND hope that you’ll let us know what happens. Very interesting problem.
Well, no help from the VMware forums, I switched to openvz and kvm for my virtualization strategy and that works without any issues… not as easy to set up and not as powerful, but it does linux virtualization much better…
Thanks for that update. I’m now playing with Windows Virtual Machine (Win7 Pro for XP) and VMware Player (a PITA with Backtrack).