Return to "Miscellaneous"

Understanding the VDS Directory Structure and File Locations


 
The topic of this article is not supported by our customer support department, however for your convenience we are providing this material to assist you in troubleshooting potential issues related to this topic.

Frequently Used Folders

Your main website is located in /var/www/html - any files or folders inside of this directory will be accessible with your web browser. For instance, if you have a file /var/www/html/contacts.html then it will be visible from your website as http://yoursitedomain.com/contacts.html.

Another notable web folder is /var/www/cgi-bin/; all CGI and Perl scripts must be located in this directory, and are accessible at http://yoursitedomain.com/cgi-bin/filename.pl.

When creating a virtual host, you will create a new folder for it inside of /var/www/ such as /var/www/newsite.com; this will allow you to organize all of your site content in one place without actually storing one virtual host’s files inside of another website.


Information for Advanced Users

Email messages are handled in a variety of locations on your account. The first and most important folder dealing with email is /var/spool/mail/, which holds all of your new messages until they are downloaded by your email client. You will see a file in this directory for every email account you have setup in the VDS Manager.

Similarly, there is a folder /var/spool/mqueue/ which is where your email comes and goes when you are sending emails and when someone sends an email to you, before it arrives in your file in the /var/spool/mail/ folder.  Typically this folder does not have very many files in it, and so it is usually the most likely candidate for when your account is using more disk space than you expect. Any files that are more than a few hours old in this directory can be deleted to save space.

If you are using NeoMail on your account, the folder /var/neomail/users/ is where all of the personal emails for your accounts are stored. This is another likely candidate for using up disk space without you realizing it. 

If you are using Miva then the files in /usr/local/miva might be of use if you are attempting to install third party modules or payment libraries.
Your databases for MySQL are all located in /usr/local/mysql/

MajorDomo configurations are located in /usr/local/majordomo/


Important Files

Many PHP scripts require modifications to the php.ini file. For compatability with future updates, OpenSourceHost allows for multiple PHP configuration files as opposed to directly editing the php.ini file. To add custom PHP configuration lines, such as “display_errors = On”, just add your own configuration file into the /etc/php.d/ directory; an example file name for your new configuration file would be 99user.ini. Once you make changes to this file, you will need to restart your VDS using the link in the left side of your VDS Manager.

The Perl binary is located at /usr/bin/perl (which can be denoted as #!/usr/bin/perl in the first line of your Perl scripts).

The Python binary is located at /usr/local/bin/python (which can be denoted as #!/usr/local/bin/python in your Python scripts).

The NeoMail configuration is available at /var/neomail/neomail.conf ; the only useful setting to edit is the @domainnames line, which allows you to add your virtual hosts to the From: drop-down inside of NeoMail.

If you need to make changes to the Apache configuration, simply create your own configuration file in the /etc/httpd/conf.d/ directory and then restart Apache using the link in the left side of the VDS Manager.