Physically, Application Vault is a connected structure consisting of database tables, files and directories.
The Application Vault root directory is located in <plesk_root_dir>/var/cgitory, where <plesk_root_dir> is the path in the file system to the directory where Plesk Server Administrator is installed. By default, for UNIX systems the path is as follows /usr/local/psa. For Windows systems it is as C:\Program Files\SWSoft\PSA.
During its installation in the system, the application creates a subdirectory in the root directory of the repository. The subdirectory name is formed in the following way:
< application name >-< application version >-< application release>
Otherwise, the control panel won't find the directory of the newly installed application. Such mechanism of names creation makes it possible to keep several versions of one application in the repository, if it is necessary (for example, a certain user prefers to use a certain version of the application).
The following system directories should be definitely located in the subdirectory:
If it necessary for a web application to have system files outside of repository/virtual hosts directories (so'files, dll, language modules), these files may be installed during installation of the package in the system. It is done automatically for RPM packages. In other cases, the way of installation depends on the developer of the package.
This directory is
used for storing scripts (executable scenarios), which do low-level
tasks at actions, performed on the application.
The following scripts can be called in from the scripts directory of an application:
These files can be both system supported scripts (such as shell or vbs, for example) and ordinary executable files. Names of installation scripts are given in the sapp_constants configuration file.
Scripts parameters are sent to the
standard input in the form of a set of lines in the following format:
< parameter name >=< parameter value >
Note: The equals sign must not
be separated by blanks.
Here is the example of how to extract parameters from a standard input stream:
|
#!/bin/sh> # Read parameters
from stdin FS=${FS_BACKUP} |
All the described scripts are optional and are used only when it is necessary to have corresponding functionalities for the application.
This
directory contains files with HTML or PHP codes used when it is
necessary to acquire a user about parameters of the application when
installing, reconfiguring or updating it on the domain. The process
of data input by the user may be a multi-step one, that is why when installing an
application on the domain, for the files
with the input elements forming code, names are formed in the following way:
installer-form-<step number>.php
Also, this
directory contains files with the code of processing the data received at
every step (check that input data is correct, full and etc.). For the
files with a data processing code, during the installation of the application
on the domain, names are formed in the following way:
installer-handler-<step number>.php
For the files with the data processing code, in the process of reconfiguration of
the application on the domain, names are formed in the following
way:
reconfigure-handler-<step number>.php
For the files with the input elements forming code, in the process of reconfiguration of
the application on the domain, names are
formed in the following way:
reconfigure-form-<step number>.php
If any of these files is missing in the directory, it is not considered to be an error.
If at the first step of installation
both files are missing (the file with the form forming code and the
file with the data processing code), it means that the user is
acquired only the name of the subdirectory in the virtual host, where
the application should be unpacked, and in which part of the virtual
host the application should be installed (SSL or non-SSL).
If the files of the
first step of reconfiguration are missing, it means that reconfiguration is impossible.
If the files of the first step of updating are missing, it means that the application doesn't support its own updating mechanism and it should be updated in the standard way - by removing files of the old version and unpacking files of the new one.
This directory contains the archives with the application files used for installing it on the virtual host. At the present moment, there are two types of archives in this directory. They have the following functions:
- the httpdocs-files.tar archive contains information files of the application, designed to be unpacked in the http(s)doc directory of the host;- the cgi-bin-files.tar archive contains application files with CGI-scenarios, designed to be unpacked in the cgi-bin directory of the host.
Both files are optional. If both files are missing, it may mean that either there is an error in the web application package, or the application will be formed by a postinstall script.
This directory is used only for non-RPM packages. It contains the uninstall script, which has the functionality equal to the PREUN script in RPM packages. The control panel executes this script when an application is removed from the repository before removing the package directory in the repository. The functions of this script are fully described in the Removing Package From Repository section.
This directory should contain the index.<locale name>.html file which has the user manual for this application. Locale name is the name of the locale this document is written in, which coincides with the locale used by a customer. The control panel searches for this file, and, if it is found, the link to this document is displayed in the list of all available or installed web applications. If the locale, used by the customer, does not coincide with the default locale name, the index.< default locale name >.html file is searched for, and, if it is found, the link to this file is given. Default locale name is the locale the package was originally created to be used in (for example, the native system of developers). In case neither of the previous variants was realized, the system searches for the file with the manual, created in the English (USA) locale ( en(US) ). More about locale names see here.
This directory contains the info.xml file which is used to describe the application properties, its system requirements and configuration parameters. The package must definitely contain the directory and the file, otherwise it won't be accessible from the control panel:
The info.xml file sample:
|
Also,
it contains the button.gif
file with the image for the custom
button.
This directory contains the app_screenshot_1.png and app_screenshot_thumb.png files with illustrations of the application front end. (Please, see <Example>).
The sample of the repository structure with the installed webexample-2.0.2-3 application:
|
/usr /local /psa /var /cgitory /webexample-2.0.2-3 /scripts postinstall postuninstall /forms installer-form-1.php installer-handler-1.php installer-form-2.php installer-handler-2.php /apps cgi-bin-files.tar httpdocs-files.tar /uninstall uninstall /docs |