A
A
Alex_872018-09-25 17:34:07
LAMP
Alex_87, 2018-09-25 17:34:07

Show default apache file in browser instead of index.php?

Good evening! On the virtual machine, I created a local site test-lamp.local Only after launching it in the browser of the virtual machine, instead of the contents of the index.php file, I get the default apache page. Please advise why this is happening? Why doesn't the index.php page work???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2018-09-25
@SagePtr

Apparently, either your virtual host is not enabled, or the DocumentRoot in it points to the wrong folder (most likely, to the default one where the stub page is located)

K
Kirill Kudryavtsev, 2018-09-25
@Deissh

Check the contents of the file /etc/apache2/mods-enabled/dir.conf
It should be like this, in the first place is index.php and not index.html.

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

It is also possible due to the fact that the virtual host was configured incorrectly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question