This is my first post here and I hope I'm doing the right way.
I installed apache2 in my ubuntu 14.04 local machine for studying purposes and all my files are in my home public_html folder.
When I try to access a site like localhost/~{user}/test/index.php everything works fine, but when I try to access the same site with localhost/home/{user}/public_html/test/index.php I get the following error:
The requested URL /home/{user}/public_html/test/index.php was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
I tried to use:
$echo dirname(__FILE__);
But it returns /home/{user}/public_html/test.
So why can't I access the same file with both paths?