-
Notifications
You must be signed in to change notification settings - Fork 36
file system
This guide describes the files and directories in a typical Melody installation.
- File System Tour
- Server Directories
- Core Directories
- Plugin Directories
- Addons Directories
- Blog Directories
Directories in Melody each have a specific purpose and contain all the files necessary for that purpose. Here we will explain each of these specific directories.
Each hosting provider sets up their system differently and names the various directories based upon their preference, but the general organization is the same. Here is a sample file structure with notes regarding files and directories important for installation:
www/ <-- Site Directory (may be the same as the user directory if single-site account)
cgi-bin/ <-- "cgi-bin" executeable files directory
melody/ <-- Application Directory or $MT_HOME
addons/ <-- Addons directory
alt-tmpl/
default_templates/
extlib/
import/
index.html
lib/
add-notify.cgi
atom.cgi
check.cgi
comments.cgi
config.cgi <-- config.cgi
config.cgi-original
cp.cgi
feed.cgi
ftsearch.cgi
search.cgi
mt-static/ <-- Static Directory (moved to web root if necessary, see in web root)
tb.cgi
testbg.cgi
upgrade.cgi
wizard.cgi
xmlrpc.cgi
index.cgi <-- formerly mt.cgi
php/
plugins/ <-- Plugins Directory
readme.html
search_templates/
tmpl/
tools/
html/ <-- Web Root (or Site Root, if publishing directly to the web root. Could also be the "Website Root")
blog/ <-- Blog Directory or "Blog Root"
index.html <-- homepage of the website
mt-static/ <-- Static Directory
addons/ <-- Addons Static Directory
codepress/
css/
flash/
htc/
html/
images/
index.html
jquery/
js/
mt.js
plugins/ <-- Plugins Static Directory
readme/
styles.css
styles_de.css
styles_es.css
styles_fr.css
styles_ja.css
styles_nl.css
support/ <-- Melody Static Support (Melody places userpics and cache files here. Must be writeable.)
themes/
themes-base/
The webroot directory contains the homepage of the website. This directory is where the mt-static
directory will be placed (or where it will be aliased to unless static files can be served from cgi-bin
directory).
File path to the web root directory is similar to one of the following:
/var/www/html/
/home/USERNAME/WWW.DOMAIN.COM/html/
The cgi-bin
directory is where cgi scripts are executable. This directory is usually named cgi-bin
, but may be CGI-BIN
or cgi
. If this directory doesn't exist as a sibling or child of the web root directory, ask your hosting provider for the location.
File path to the cgi-bin
directory is similar to one of the following:
/var/www/cgi-bin/
/home/USERNAME/WWW.DOMAIN.COM/cgi-bin/
aka $MT_HOME
Throughout this guide $MT_HOME
is used to refer to the Application Directory, the directory where Melody is installed. The application directory is often named as "melody" or "mt" or "m", but may be named with the version and language like "Melody-1.0". In the config.cgi
configuration file it will be the value of the CGIPath config directive.
File path to the application directory is similar to one of the following:
/var/www/cgi-bin/melody/
/home/USERNAME/WWW.DOMAIN.COM/cgi-bin/melody/
The application directory is the directory which contains the index.cgi
script:
http://www.domain.com/cgi-bin/melody/index.cgi
aka $MT_STATIC
or $m-static
Throughout this guide $MT_STATIC
is used to refer to the Static Directory. This directory is named mt-static
or m-static
. This directory is where static files such as images, css, and javascript which are used by the Melody application and some blog functionality. Static files for plugins are also placed in the plugins
subdirectory of this directory.
This directory may be in one of a few places, typically the application directory or the web root.
Tip: See the value of the
StaticWebPath
directive (orStaticFilePath
if used) in theconfig.cgi
file to determine the location.
File path to the static directory is similar to one of the following:
/var/www/html/mt-static/
/home/USERNAME/WWW.DOMAIN.COM/html/mt-static/
The url to this directory is typically:
http://www.domain.com/-static/
To confirm you have found the correct directory, look for the mt.js
file in the $MT_STATIC
directory:
http://www.domain.com/mt-static/mt.js
Melody places userpics and other files in this directory.
File path to the static support directory (located in the Static Directory) is similar to one of the following:
/var/www/html/mt-static/support/
/home/USERNAME/WWW.DOMAIN.COM/html/mt-static/support/
The url to this directory is typically:
http://www.domain.com/mt-static/support/
The plugins directory is where all user-managed and installed plugins are located. Plugins managed by users, as opposed to by the core application, are kept in a dedicated directory to make sure they are not interfered with by future upgrades.
File path to the plugins directory (located in the Application Directory) is similar to one of the following:
/var/www/cgi-bin/melody/plugins/
/home/USERNAME/WWW.DOMAIN.COM/cgi-bin/melody/plugins/
The url to this directory is typically:
http://www.domain.com/cgi-bin/melody/plugins/
File path to the plugins static directory (located in the Static Directory) is similar to one of the following:
/var/www/html/mt-static/plugins/
/home/USERNAME/WWW.DOMAIN.COM/html/mt-static/plugins/
The url to this directory is typically:
http://www.domain.com/mt-static/plugins/
The addons directory is where all packs and plugins that are shipped with the core distribution are packaged and maintained. Users are discouraged to install plugins here unless specifically instructed to do so by the plugin in question.
File path to the addons directory (located in the Application Directory) is similar to one of the following:
/var/www/cgi-bin/m/addons/
/home/USERNAME/WWW.DOMAIN.COM/cgi-bin/m/addons/
The url to this directory is typically:
http://www.domain.com/cgi-bin/m/addons/
File path to the addons static directory (located in the Static Directory) is similar to one of the following:
/var/www/html/mt-static/addons/
/home/USERNAME/WWW.DOMAIN.COM/html/mt-static/addons/
The url to this directory is typically:
http://www.domain.com/mt-static/addons/
A symlink can be created to point "m" to the current application directory in the cgi-bin
so that Melody can be accessed without the version number in the URL:.
http://domain.com/cgi-bin/melody/index.cgi
Instead of the versioned URL (or "in addition to" because the actual directories can still be accessed):
http://domain.com/cgi-bin/Melody-1.0/index.cgi
With this symlink (or alias) users won't have to to access a new url and the application directory name doesn't have to be changed from the version name it came with which helps to more easily know which version of Melody is installed without viewing the footer while logged into Melody. Also config.cgi
files won't need to be updated with new CGIPath
and StaticWebPath
variables.
For the following directory structure:
cgi-bin/
melody -> Melody-1.0
Melody-1.0
Melody-1.1
This command will remove the current "m" symlink and then create a new symlink:
rm m; ln -s Melody-1.0 melody
Please note: Your cgi-bin
directory must be configured with the FollowSymLinks options in order for this to work.
This is the directory in which the website or blog is published, one exists for each blog or website published.
This directory is the value used for the "Website Root" or "Blog Root" setting on the "General Settings" or "Publishing Settings" screen.
Blog directories are often sub-directories of website directories or other blog directories.
Questions, comments, can't find something? Let us know at our community outpost on Get Satisfaction.
- Author: Six Apart Ltd., Jay Allen, Byrne Reese
- Edited by: Violet Bliss Dietz