I was having trouble enabling apache2 to run .php pages.
Then I did the following:
I removed the Directory address from the html folder, so the file was:
Iremovedthehtmlfolderin/var/www/htmlbecauseNetBeanswhentryingtocreateaprojectin.phpdidnotletitwritetothewwwfolderbecauseitwasnotempty.
Ichangedthepermissionofthe/var/wwwfoldertochmod777
Ichangedthe/etc/apache2/sites-enabled/000-default.conffilebyremovingthehtmlfromthe/var/wwwaddress
Now every project I create runs correctly at the localhost / index.php address. Before that I got the message that the index.php file did not exist on that server:
Not Found
The requested URL /html/index.php was not found on this server. Apache / 2.4.25 (Debian) Server at localhost Port 80
In addition, when the html folder existed and it was correctly configured in the files 000-default.conf and apache2.conf with the index.php inside it, it did not work, the same message was not found, but if I removed html from the localhost / html / index.php address, the page ran normally. I have not been able to understand why.
Something tells me that this is not the right way to organize things. Could anyone give their contribution to best practices in this case? How should I properly configure apache2, php7.0 plus NetBeans?