I've installed the LAMP stack on my Ubuntu 14.04 laptop using the command:
sudo apt-get install apache2
I went to localhost and it shows the typical tree (Index of ... https://i.stack.imgur.com/DPc8A.png in my case the tree is empty).
So I type at the command line sudo service apache2 start
After that I create a hello world php file, called example.php
And then I put that file inside var/www folder (to getto that folder I go to files and then to system, and then to var folder, and then to www folder).
And finally I open my browser and type localhost/example.php
The file appears as not found.
Note: From the console I've done this also: sudo chmod -R 755 var/www
I've also checked www folder perms and anybody has access files and I have "create and delete files" permission.
What should I do? The files are there but localhost show an empty list and Any file is "not found" when I try to acess it from the browser.
apt-get install apache2
only installs apache2 surely? To get the full LAMP stack you would needsudo apt-get install lamp-server^
or equivalent.