1

I have an existing Laravel 5.5 project which works on Mac with built-in apache and has a virtual host.

Recently, I had to maintain a new Laravel project, which was already been developed in progress, and I did to it with the same steps that I did to the existing project.

But, the new project can just download the index.php file under public.

I've searched the relevant questions and tried most of the solutions(like PHP code is not being executed, instead code shows on the page), however, none of them worked.

Does anybody know about this strange situation?

LZong
  • 39
  • 1
  • 6
  • I'm using Laragon 5.0. and facing the same issue, as soon as I run something.test, it downloads some file. – Leutecia Jan 03 '23 at 10:33

1 Answers1

0

It turned out to be the apache didn't get the index file format correctly, so once I ran the virtual host, it would only download the php file.

After I add "index.php" in the DirectoryIndex statement in httpd.conf, the problem was perfectly solved.

LZong
  • 39
  • 1
  • 6