I set up Apache web server.
When I open
http://localhost in Google Chrome, it asks me to download a file. It works correctly with Firefox.
How can I resolve this issue?
Sounds like your server is sending a Content-Type header that Chrome thinks it should download, rather than display.
You can check for this with:
which should display the headers that the server is sending.
You are probably needing to install php or it is not running at the time that you wish to open a PHP file.
If this is the case, first make sure everything is OK in your PHP config by running the next in a php file which you can name
The result should be like this:
If you are receiving issues in your php config you first try to fix it, and if you receive an info.php file download then you should first install php support in your system, which can easily be achieved via synaptic.
I have exactly the same strange behaviour here on a local debian webserver running up-to-date apache2.
Mozilla and even IE are behaving well, but new shooting star Chrome just downloads the page as text. Occurs only when the link ends with a slash (so the DirectoryIndex-File is automatically served), i.e. http://intranet/
When i type http://intranet/index.php, the page displays fine... i have tried both URL-calls with wget, and the output and content-type is EXACTLY the same!
What's wrong here? Is it just me or is it Chrome?