
53
FLASH
MEDIA
SERVER
4.5
CONFIGURATION
AND
ADMINISTRATION
Configuring the server
Last updated 11/28/2012
Note that if the client calls
ns.play("sample")
, the stream name does not match any virtual directory specified, so
the server will then look for sample.flv inside the directory specified by the storage directory element (
<storageDir>
).
If no storage directory is specified by
<storageDir>
, then the server looks in the default location (the streams folder)
for the file; that is, the order in which the server looks for files is:
1
Virtual directory (as specified in
<VirtualDirectory>
)
2
Storage directory (as specified in
<storageDir>
)
3
Default location (the streams folder in the application directory)
Virtual directory example: Local and network file paths
The following table shows three examples of different virtual directory configurations, including mapping to a
network drive, and how the configurations determine the directory to which a recorded stream is published. In the
first case, because the URI specified (
"myStream"
) does not match the virtual directory name that is specified (
"low"
),
the server publishes the stream to the default streams directory.
Important:
To play an F4V/MP4, MP3, or RAW file, specify the codec before the path, for example
ns.play("mp4:low/myStream")
. The mp3 prefix is
mp3:
. The RAW prefix is
raw:
.
Configuring Apache HTTP Server
About Apache HTTP Server
Flash Media Server includes Apache HTTP Server. If you install and enable the web server, you can deliver client SWF
files, container HTML pages, and media assets from Flash Media Server. You can serve content over HTTP, as well as
RTMP. In addition, you can serve video over HTTP progressive download as a fallback solution for web proxies that
break RTMP or RTMPT.
The Flash Media Server installation of Apache is like the standard installation. You can use Apache documentation for
most configuration tasks. The Apache root installation folder is
rootinstall
/Apache2.2. The web root is
rootinstall
/webroot.
Note:
The Flash Media Server documentation uses “rootinstall” to indicate the Flash Media Server root installation folder
(C:\Program Files\Adobe\Flash Media Server 4 by default on Windows). The Apache documentation and configuration
files use “ServerRoot” to indicate the Apache root installation folder.
Installation locations
The Apache server that installs with Flash Media Server differs from a standard Apache installation in the following ways:
•
The apachectl files are in the
rootinstall
/Apache2.2/manual/programs folder.
•
The httpd.conf file and the standard secondary configuration files are in the
rootinstall
/Apache2.2/conf folder.
Mapping in Vhost.xml
<VirtualDirectory><Streams> tag
URI in NetStream call Location of published stream
low;e:\fmsstreams
"myStream"
c:\...\
rootinstall
\applications\yourApp\streams\_definst_\myStream.flv
low;e:\fmsstreams
"low/myStream"
e:\fmsstreams\myStream.flv
low;\\mynetworkDrive\share\fmsstreams
"low/myStream"
\\mynetworkDrive\share\fmsstreams\myStream.flv