Philip

Status
Not open for further replies.

prk770

New Member
Messages
1
Reaction score
0
Points
0
Hi, What is difference between Web root directory and public access directory. If I make changes to my website do I edit my files on which directory? I have my files on both dir's but recent corrections show only on from the dir I edit it from.C ould you briefly explain the "hierarchy" scheme of things.

Thanks,

Philip;):happysad::cool:
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
All files in the /public_html/ folder, or /www/ folder are accessible at your site. This is your web root.

The cPanel file manager just gives you options of where you want to open. Selecting web root opens up your website (viewable to the public).

Any other questions, just ask!
 

csc2ya

Member
Messages
120
Reaction score
0
Points
16
Your files need to go into the public_html directory.

If by web root, you mean the www directory, you can also put them in there since all the www directory does is serve as an alias for public_html.

However, if you mean /home/prk770 (assuming that is your cpanel username) putting the files in that folder will not work.

Regarding what directories do what, i'm not 100% certain of everything, but I am pretty sure on the following things:

public_html is the web root directory as the webserver see's things. When you enter your domain into a browser, this is where the server looks for your files.

www is an alias that points to the public_html directory

public_ftp is used if anonymous ftp is enabled on your account. Any time someone connects anonymously to your account (if that option is enabled in cpanel), any files they upload will be put in this directory.

There are other directories, but they are system directories used by the server for various things (access logs for example)

There are also several files in the root directory (the home/username directory) used for things like access control (.htaccess), fantastico script installs (now obsolete), and softaculous script installs.
 

descalzo

Grim Squeaker
Community Support
Messages
9,372
Reaction score
326
Points
83
You main website files are kept in

/home/username/public_html

or, public_html

www is

/home/username/www

but is really an 'alias' for public_html. The files in public_html are the same files in www, not copies. Delete foo.html in www and it will be gone from public_html and vice versa.

'Document root' is the directory where Apache starts to look for the files for your website. So a webfile www.mysite.com/stuff/foo.html will be located on the server:

/home/username/public_html/stuff/foo.html

If you have a subdomain at x10hosting, like games.fun.x10hosting.com, then the 'Document root' for that subdomain will be

/home/username/public_html/games

and games.fun.x10hosting.com/chess/checkmate.html would be located in

/home/username/public_html/games/chess/checkmate.html
 
Last edited:
Status
Not open for further replies.
Top