Web space
This page describes the directory structure of your web space, and explains where you should upload files for your website to. For more information on how to upload files, please see the Uploading Files page.
Directory structure
Your hosting account has a home directory on our server. Your home
directory is /home/USER/
where USER is the username for your
hosting account. Most file upload software will default to showing you your home
directory when you first connect, so you will not normally need to navigate
here.
Within your home directory is a directory called www
. This contains:
log
– contains log files for your websites, if you have enabled logging in our control panel.cgi
– a directory where server-side CGI scripts can be placed. Most modern web applications do not make use of a separate CGI directory, so most users can ignore this directory.- A separate directory for each of the websites hosted on your account. This is where you should upload the files for your website to.
For example, the files in your webspace might look something like this:
www/
www.example.com/
index.html # Files that you have uploaded for https://www.example.com
about.html
example.com/ # Directory for Files for https://example.com
log/
access.log # The current web server log
error.log # The current web server error log
access.log.1 # The previous web server log
error.log.1 # The previous web server error log
access.log.2.gz # An older web server log - note this file is compress using GZIP compression
error.log.2.gz # An older web server error log (compressed)
cgi/
www.example.com/ # Directory for CGI scripts
example.com/ # Directory for CGI scripts
Note that if you have a domain hosted on your account you will have separate directories for the www-prefixed name and the bare domain name. It is common to redirect one of these names to the other (this can be done via Web Settings in the Customer Control Panel), in which case you should place files in the directory for the name that you are redirecting to.
For example, you may wish to configure example.com to redirect to
www.example.com, in which case you should upload files to the
www.example.com
directory.
CGI directory
The www/cgi/
directory can be used for any server-side scripts that you want
to run. Within the www/cgi/
directory is a separate directory for each
website hosted on your account. Any scripts placed within this directory will
be accessible as https://www.example.com/cgi-bin/SCRIPTNAME, where
www.example.com is the name of your site, and SCRIPTNAME is the name of the
script.
As noted above, use of a separate CGI directory is no longer common practice, so if you are using an application such as WordPress you can ignore this directory. Nonetheless, using a separate CGI directory can have benefits, as it prevents a misconfiguration from accidentally disclosing the source code to your scripts.
Directory indexes
When a web browser makes a request for a directory, our web server will try to
find a file to use to provide a response. For example, if you were to browse
to https://www.example.com/, our web server would look in the
www/www.example.com/
directory for a file with one of the following names:
index.html
index.shtml
index.cgi
index.pl
index.php
index.php3
index.xhtml
index.htm
The web server will use the first file in this list that exists. If none, exist, a directory listing for that directory will be shown.
The directory listing can be disabled by creating a file in the directory called .htaccess
with the following content:
Options -Indexes
This setting will apply to that directory, and any subdirectories, unless overridden by another .htaccess
file.
Mail configuration files
Your home directory may also contain a number of files starting with
.forward
. These control how mail for your domain is handled. Advanced users
may wish to edit these files directly, but otherwise you should leave them
untouched. See Advanced Email Configuration for more information.