0

I have installed apache2-server, php5, and mysql-server. In my browser when I type localhost it shows the default apache2 page.

enter image description here

I also made a main.php file in /var/www/html. Then when I type localhost/main.php it executes and shows the main.php file's content in the browser and sometimes it fails. I don't understand what the issue?

I always run sudo service apache2 restart but it doesn't solve the issue.

I am using Ubuntu 14.04 and firefox 58.0.2.

Output of -

$a2query -m php5
php5 (enabled by maintainer script)
alhelal
  • 2,621

1 Answers1

0

Use 127.0.0.1/main.php instead of localhost/main.php

This works for me.

alhelal
  • 2,621