PHP not working in apache2 server

Started by ifrahiman, October 19, 2017, 11:08:00 PM

Previous topic - Next topic

ifrahiman

Hi few days ago i download Bwapp & put it into the directory /var/www/html, started the apache2 server, but It was giving a 403 Forbidden error (i have already setup the permissions of the directory)

But then i dig more into the issue and found out the Error wasnt because of bwapp , but any PHP file is not working and it is giving the same error (403 forbidden error) in any php file inside /var/www/html/ , but all other files (html, xml, images etc) in any directory they are having no problem.

but apache2, phpcli, myphpadmin, etc have no issues.

I just installed backbox a month ago and i havent messed up any type of configurations even i didnt used apache2 server before this. I have googled a lot but i cant find any possible solution.

Can someone help in this ?

ZEROF

Hi,

Your best friend in next few hours, after reading this answer, are going to be ... LOGS !!!!!!!!!!!

Open always one terminal and type tail -f /var/log/syslog and 2nd (if i remember well) tail -f /var/log/apache2/error.log (or something) like that. If you get to much of logs you can always grep for some extra words like php, error or warning etc.. like tail -f /var/log/syslog | grep -i someword.

Then open/run what you want to open, and check for errors. Then read them, then search them online.

Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*