Reputation: 2540
So, I've looked around quite a few questions around Stack Overflow and many of them mention the "webroot" - when looking for a specific definition of it, though, I've been unable to find one. Does the webroot refer to the very base file (as in "App:) in my structural example below. Or does it refer to where the file you are talking about relatively? I.e. if I was talking about balance.php would it refer to view?
app
--Protected
______view
__________balance.php
----------level.php
Upvotes: 2
Views: 905
Reputation: 360702
Generally, the webroot, aka document root, is where "publicly accessible" files start in a website.
E.g. your site has a file, and url pointing at that file:
/home/sites/example.com/html/private/downloads/cutekittens.jpg
http://example.com/private/downloads/cutekittens.jpg
^---where the document root starts
Note where the two start corresponding. Everything "above" that point (/home/site/example.com/html) is OUTSIDE of the site's document root. Anything inside that .../html
directory is inside the document root, and therefore accessible by browser from outside the server.
Note that this doesn't take into consideration any server-side aliases, rewriting, routing, etc...
Upvotes: 4
Reputation: 866
It will be the base directory where web-accessible files go, usually called public_html, httpdocs, htdocs or wwwroot.
Upvotes: 0