I recently had this problem, but only when accessing the root of my site (for example, http://example.com ) - it worked as expected when accessing index.php explicitly (for example, http://example.com/index.php ).
The problem was that before creating index.php , I had the index.html file in the root directory of the website, but then I renamed it to index.html.bak to "move it to the side." Unfortunately, this does not stop it. For some reason, Apache will serve this file with the MIME type application/x-trash .
(Since the file /etc/mime.types contains a line reading " application/x-trash ~ % bak old sik ")
Maybe this will help someone else who scratches his head the way I was.
source share