Been trying the entire day to set up a lamp server. First I did: sudo apt-get install lamp-server^
And everything seemed to work. When I visited localhost
the it works!!
page showed. Then I mistakenly deleted my html folder. But i replaced it by my own. But then (ofc) the it works!!
site disappeared, but my server was still working. But to revert this I tried to uninstall my lamp server, following these tips: How do I remove the LAMP stack so I can start over?
But since this is an old tutorial my system couldn't find most files when I tried to remove them...
Anyhow, after that I tried to install everything again by hand: sudo apt-get install apache2
, sudo apt-get install apachelib2-mod-php
, sudo apt-get install mysql-server
. Then did a mysql_secure_isntallation
or something. And followd the instructions.
Now when I visit localhost
the only thing that is outputed is
<php
echo "hello";
?>
which is a file i put there myself (not that it outputs the entire code). Also, I cant access my mysql database, even though i put the right password.
One huge problem I made is that I followed like 10 different tutorials on this, all which seem outdated since they all mentioned php5.
I know Im out on deep water here, but I don't even know how to debug this or what to check for. What can have gone wrong? What is still working? What is my best course of action right now?