DIRECTORY STRUCTURE

What is the directory structure of my Linux website?

Please note: This support article is a guide for our Linux users only.

The following article explains the directory structure of your Linux website on our servers. Within your website directory there will be a number of different directories. These directories are added by our system to help your website run smoothly and efficiently. They are required for your website to run.

htdocs

The htdocs directory is your main web directory. All files placed in this directory are visible in a web browser. When building your website, you want to place your files within this directory. The server knows to look in this directory so you do not need to specify htdocs in your code. When uploading your website through FTP, you will need to change into the htdocs directory on the server.

cgi-bin

The cgi-bin directory is the one exception for your web files; all cgi scripts must be placed within the cgi-bin directory. Your cgi scripts will not run correctly if placed within the htdocs directory. Separating the cgi-bin and htdocs directories allows us to place proper permissions on the cgi-bin directory without impacting the performance of the htdocs directory.

logs

The logs directory contains the site and the error log files for your website. Your site logs track your website's visitor information, which is then used by SmarterStats for web statistics. Your error logs track your website's error information, which can be used to troubleshoot most errors on your site.

cgi-php

The cgi-php directory contains the phpwrapper file. This file is used by the server to enable PHP for your website. There is no need to add or remove files from this directory.

etc

The etc directory is used to store configuration files that are not directly referenced from a web browser. By default, this directory contains the php.ini file which contains the PHP configuration information for your website.

tmp

The tmp directory may be present within your website directory. This directory is used by the system to store temporary information for your website, such as when scripts are run. If this directory is not present, your website will still function as normal. There is no need to add or remove files from this directory.

 
© HostMySite 2014    |   Contact Us   |   SiteMap   |   Terms of Service   |   Privacy Policy   |   AUP