Flash Media Server Resources
|
Provisioning the server
Adaptors and virtual hostsProvisioning
a server divides the server into separate sections. Provisioning allows
multiple administrators to configure their own sections on one server.
If you use your server for hosting, you can provision it so that
each customer has their own section. You can provision Flash Media
Server in several ways, depending on your needs.
The server is divided into hierarchical levels: server, adaptor,
virtual host (also called vhost), and application. The server
is at the top level and contains one or more adaptors. Each adaptor
contains one or more virtual hosts. Each virtual host hosts one
or more applications. Each application has one or more instances.
You can add adaptors and virtual hosts to organize the server for
hosting multiple applications and sites.
If you’re hosting multiple websites on a server, use virtual
hosts to give customers their own root folders. For example, you
could use two virtual hosts to host www.test.com and www.example.com
on the same server.
You can assign an IP address or a port number to an adaptor,
but not to a virtual host. For this reason, use adaptors to organize
virtual hosts by IP address or port number. For example, if a virtual
host needs its own IP address to configure SSL, assign it to its
own adaptor.
You can also configure one virtual host to run as an edge server
and one to run as an origin server. This is called running the server
in hybrid mode.
Configuration folder structureEach of these levels—server,
adaptor, virtual host, application, and application instances—has
distinct configuration settings stored in XML files in the RootInstall/conf
directory: Server.xml, Adaptor.xml, Vhost.xml, and Application.xml. There
are also configuration files for information about administrators
and logging: Users.xml and Logger.xml. The most important configuration
parameters have been pulled out to the fms.ini file, which enables
you to use one file to configure the server.
 Default structure of the server’s configuration (conf) directory Edit any of these XML files in a text or XML editor and restart
the server for the changes to take effect. If you modify Users.xml
or fms.ini, you also must restart Flash Media Administration Server.
For more information, see Working with configuration files.
The following rules define the conf directory structure:
The root configuration folder is RootInstall/conf.
You cannot remove or modify the name of this directory. The server
must have a Server.xml file, a Logger.xml file, and a Users.xml
file in the conf directory.
The
server has one initialization file, fms.ini, in the RootInstall/conf
directory. This file contains commonly used settings, including
the administrator user name and password and the settings you chose
during installation.
The default adaptor’s root directory is RootInstall/conf/_defaultRoot_.
You cannot remove or modify the name of this directory. Each adaptor
must have an Adaptor.xml file in its root directory.
The default virtual host’s root directory is RootInstall/conf/_defaultRoot_/_defaultVHost_.
You cannot remove or modify the name of this directory. Each virtual
host must have a Vhost.xml file in its root directory. Each adaptor
must have a default virtual host.
Virtual host directories may also contain an Application.xml
file that serves as a default to all applications in that virtual
host and a Users.xml file that contains information about administrators
of that virtual host.
You may place an Application.xml file in an application’s
registered directory to create an application-specific configuration.
For more information about registered application directories, see
the Developer Guide.
Add an adaptorCreate
a new directory with the name of the adaptor in the RootInstall/conf folder;
for example, RootInstall/conf/adaptor2.
In the adaptor2 directory, create or paste a copy of the
_defaultVHost_ directory and an Adaptor.xml file.
Each adaptor
directory must contain a _defaultVHost_ directory and an Adaptor.xml
file.
In the _defaultVHost_ directory, create or paste a copy of
an Application.xml file and a Vhost.xml file.
In the Adaptor.xml file in the adaptor directory, add a HostPort element
to listen on a new port for this adaptor:
<HostPort name="edge2" ctl_channel=":19351">:1936</HostPort>
The name attribute
must be unique on the server. The control channel (ctl_channel) attribute
and the HostPort value specify the ports to which
an IP address should bind. If an IP address is not specified, the
adaptor can listen on all available interfaces. The server uses
the control channel (ctl_channel) attribute internally
to communicate between server processes (adding a HostPort element
creates a new FMSEdge process).
The server uses the HostPort value
to listen for clients—no two adaptors can listen on the same port,
either internally or externally, unless they use different IP addresses.
If a host has multiple IP addresses, multiple adaptors can listen
on port 1935. In addition, the control channels of two adaptors
must be different, or they cannot inter-operate. Ensure that the
control channels on which separate adaptors listen are different
from each other, as in the following example:
<HostPort name="edge1" ctl_channel=":19350">xx.xx.xx.xx:1935</HostPort>
<HostPort name="edge2" ctl_channel=":19351">yy.yy.yy.yy:1935</HostPort>
Restart the server.
To log in to the Administration Console on the new adaptor,
use the syntax adaptorname/username in the Username
box; for example, adaptor2/admin.
For information about logging
in to the Administration Console, see Connecting to the Administration Console.
Administrators are defined
in the UserList section of the Users.xml file. Administrators
are either server-level users (similar to a root user) or virtual host-level
users. If you log in to an adaptor other than the default adaptor,
you are considered a virtual host administrator and don’t have privileges
to manage the server or users.
 The conf directory with an additional adaptor called adaptor2
Add a virtual hostCreate a folder with the name of
the virtual host in an adaptor folder, for example, RootInstall/conf/_defaultRoot_/www.example.com.
Copy an Application.xml file, a Vhost.xml file, and a Users.xml
file to the new virtual host folder. (The Users.xml file is required
only if you are defining administrators for this virtual host.)
In the Vhost.xml file, specify an application directory in
the AppsDir element, for example:
<AppsDir>C:\www.example.com<\AppsDir>
Note: It is possible to use the same applications directory
for multiple virtual hosts, but it causes namespace conflicts and
is not recommended.
Validate the XML and save the Vhost.xml file.
Restart the server.
Note: You can call the
startVHost() Administration API or log in to the Administration Console without restarting the server.
Log in to the Administration Console.
For information
about logging in to the Administration Console, see Connecting to the Administration Console.
Connect to the new virtual host by specifying the virtual
host name, for example, www.example.com, in the Server name field.
Connect a test application to the new virtual host to make
sure it works.
 The conf directory with an additional virtual host called
www.example.com
|