2
Was having trouble enabling apache2 to run . php pages.
Then I did the following:
I removed from the Directory address the html folder, so was the file:
I removed the html folder in /var/www/html because Netbeans when trying to create a project in . php it wouldn’t let it be written to the www folder because it wasn’t empty.
I changed the permission of the /var/www folder to chmod 777
I changed the /etc/apache2/sites-enabled/000-default.conf file by removing the html from the /var/www address
Now every project I create runs correctly on the localhost/index.php address. Before that I received 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
What’s more, when the html folder existed and it was correctly configured in the 000-default.conf and apache2.conf files with index.php inside it, it didn’t work, the same message wasn’t found, but if I removed html from the localhost/html/index.php address, the page rotated normally. I couldn’t understand until now why.
Something tells me that this is not the right way to organize things. Someone could give their contribution on best practices in this case? How should I properly configure apache2, php7.0 plus Netbeans?