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?
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:
wget --server-response -O /dev/null http://localhost/
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
info.php
and calling it likelocalhost/info.php
when placed in your localhost root folder, usually/var/www
info.php
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.