Russ Posted May 3, 2006 Posted May 3, 2006 Sorry to be slow, but can someone help me with some vocabulary? If my domain is on TCH and is www.****, what is my "root directory," and "what is my "web directory." When I read about loading files so that they are or are not "web accessible," what does that mean? Must all my files be loaded in "public html"? If I can and do load files "above" public html, are they accessible, and if so by whom and how? Sorry if this is all obvious (and I have been trying to reseach this myself, but have gotten more confused). Thanks in advance for any help! Russ Quote
TCH-Andy Posted May 3, 2006 Posted May 3, 2006 Hi Russ, If my domain is on TCH and is www.****, what is my "root directory," and "what is my "web directory."I understand the confusion, because there are multiple answers to this Generally your "root directory" is the one you would go into using FTP, or cpanel file manager. It's in /home/cpanelusername/ on the server. Below that you have the "web directory" which is the public_html directory. On the server this is /home/cpanelusername/public_html and anything in here (or folders below it) are accessible via the web. I.e. if you go to http://your_tch_domain.com/file.htm then you are going to the file which is at /home/cpanelusername/public_html/file.htm on the server. If that all makes sense. Must all my files be loaded in "public html"? If you want them to be visible via the web - yes. If of course you want to keep anyone from reaching those files (for example a backup script and backup files) then those files would be "above" the public_html folder. Where you can only reach them via FTP, cpanel, or a script you have placed on the server. Quote
TCH-Tim Posted May 3, 2006 Posted May 3, 2006 Your root directory (or home directory) is the folder on the server holding all of your data and is represented as /home/yourCpanelUsername/. When you FTP to your site you would generally be dropped into this folder and it's usually represented to you as a single slash "/". In this directory you will see a bunch of folders like mail, public_ftp, public_html, and so on. Your home directory is not accessible from the web, so if you needed to put something somewhere that is not accessible from the web, this would be it. You can create folders here if you want. public_html is the folder that holds your website. Everything in this folder is accessible from the web. You are able to password protect directories through cPanel, but if somebody figures out the password for that they will be able to get in. Hope this helps. Quote
TCH-Tim Posted May 3, 2006 Posted May 3, 2006 as andy and i hit the submit button at the same time... Quote
abinidi Posted May 3, 2006 Posted May 3, 2006 Actually, I'd say you didn't hit it at the same time as much as I'd say Andy beat you again. LOL Just kidding. You know we love you Tim!! *Paul ducks and runs for cover Quote
Samrc Posted May 4, 2006 Posted May 4, 2006 Generally, you will upload your website files to the public_html folder or a folder that is inside of that one. Lets say your have 4 pages on your site: index.htm, contact.htm, about_us.htm, family.htm All those pages would be uploaded into your public_html folder. Your addresses would look like http://www.******/contact.htm etc. If you have folders INSIDE the public_html folder, they are subdirectories. This is useful for separating your products, photos, topics, archives, etc into useful sections that make more sense. After all, if you had a filing cabinet you would not put all papers into a single drawer without labeled file folders. Same with a website. Using subdirectories is like putting in labeled folders in the drawer. If you have a folder inside the public_html folder called vacation_2005, you would upload your website pages that had pictures of the vacation in 2005. Then to access those pages on your website, you would type in an address like this: http://www.******/vacation_2005/grand_canyon.htm or like this: http://www.******/vacation_2005/disneyland.htm etc. In file manager or an FTP program you will see this: Folder: mail Folder: public_ftp Folder: public_html <--- this one is public. index.htm <--- this one is your website's home page. contact.htm about_us.htm family.htm Folder: vacation_2005 <--- this one is subdirectory of your website. grand_canyon.htm disneyland.htm Quote
Russ Posted May 4, 2006 Author Posted May 4, 2006 Thanks for all of the replies. They have been very helpful. Where you can only reach them via FTP, cpanel, or a script you have placed on the server. PAUL, if I upload a php file (say, file.php) into my web directory, can it access files in the root directory. For example, can file.php access data that is stored in the root directory? Quote
TCH-Don Posted May 4, 2006 Posted May 4, 2006 Yes if you use a path like /home/cpanelname/folder/filename Quote
Russ Posted May 4, 2006 Author Posted May 4, 2006 Thanks, Don. So I could load image files into the root directory, and have the file that shows them in Gallery (for example - file.php) in my public_html file, and the the images could be seen over the web? Does that question make sense. Russ Quote
TCH-Bruce Posted May 4, 2006 Posted May 4, 2006 Yes, it does. And yes, you can. That is how Gallery 2+ recommends that you do it. Quote
Russ Posted May 4, 2006 Author Posted May 4, 2006 (edited) Thanks, Bruce. I appreciate everyone's patience. From the above, this is what I think I understand: files or folders in the public_html directory can be viewed via the web (unless password protects or unless permissions are limited) either via a script or via pointing your web browser to the file (i.e., www.***/file). files or folders that are in the root directory cannot be viewed by pointing your web browser to the file; but can be viewed via a script located in public_html. This is what allows the gallery2+ recommendation to work, the image file that is in the root directory can only be viewed over the web if the person who is viewing it accessed it thru the scripts in the gallery site that is loaded on my domain. So the viewer can see the photo even though is is stored in the root directory. Is the above a correct summary? Thanks, again. Russ Edited May 4, 2006 by Russ Quote
TCH-Bruce Posted May 4, 2006 Posted May 4, 2006 Yes, just put the g2data folder at the root level. Your albums and photos will be placed in those folders. Quote
Russ Posted May 4, 2006 Author Posted May 4, 2006 Thanks! I suppose the same would hold true for a blog like word press? Quote
TCH-Bruce Posted May 4, 2006 Posted May 4, 2006 As long as you set your paths correct and use PHP scripting yes. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.