Configuring Apache HTTP Server

About Apache HTTP Server

Flash Media Server 3.5 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 3.5 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.

  • The log files are in the RootInstall/Apache2.2/logs folder. For more information, see Monitoring and Managing Log Files.

Alternate configurations

To do any of the following, edit the RootInstall/Apache2.2/conf/httpd.conf file:

  • Handle multiple adaptors or virtual hosts

  • Block sensitive file types, such as ASC

  • Handle any non-standard MIME types required for progressive download

  • Serve the default server-status and server-info pages

  • Modify source directories

Enable Apache

When you install Flash Media Server and choose to install Apache, it is enabled by default. To manually enable Apache, edit the fms.ini and Adaptor.xml files.

  1. Open the fms.ini file in a text editor.

  2. Add port 80 to the ADAPTOR.HOSTPORT tag.

    ADAPTOR.HOSTPORT = :1935, 80

  3. To start and stop Apache when Flash Media Server starts and stops, set the SERVER.HTTPD_ENABLED parameter to true:

  4. Open the Adaptor.xml configuration file in a text editor.

    If you have multiple adaptors, open the file for the adaptor you want to configure. The default Adaptor.xml file is located in the RootInstall\conf\_defaultRoot_ folder.

  5. Set the enable attribute of the HttpProxy tag to "true", as in the following:

    <HttpProxy enable="true" maxbuf="16384"> 
        <Host port="80">${HTTPPROXY.HOST}</Host> 

    Set the value of the HTTPPROXY.HOST variable in the RootInstall/conf/fms.ini file. You can also remove the variable and set the value directly in the Host tag.

  6. Save and validate the Adaptor.xml file.

  7. Restart the server.

Configure HTTP proxying

Flash Media Server uses port 80 for RTMPT connections. HTTP connections by default use port 80. To allow Flash Media Server to serve media over HTTP when RTMPT is blocked, Flash Media Server proxies HTTP connections to port 8134.

Configure HTTP proxying in the RootInstall/conf/fms.ini file. In the fms.ini file, you can enable or disable proxying through the HTTPPROXY.HOST parameter. You can also specify the port to proxy to or proxy to a remote server.

To enable HTTP proxying, set a value for the HTTPPROXY.HOST parameter. The following default configuration proxies port 80 HTTP requests to local port 8134:


Setting the parameter to no value disables HTTP proxying:


To proxy to a remote server, set the parameter to the remote server you want to use:


Deliver SWF files and HTML files over HTTP

Apache can deliver SWF files, HTML files, JPG files, and many other standard file types over HTTP. Place files that you want to deliver over HTTP in the correct folders. By default, Apache is configured to use following paths:



Example URL







These folders are global, not application-specific. Any SWF files and HTML files you want to serve over HTTP must be in these folders or in application-specific folders. To create aliases for application-specific folders, edit the httpd.conf file.

Create web directories for applications

To have Apache serve content over HTTP, either use one of the predefined web directories or create a web directory for that application. To create a web directory for an application, add an alias to the RootInstall/Apache2.2/conf/httpd.conf file. For example, the following lines create an alias that points to the streams directory of an application called “hd”:

Alias /hd/ "applications/hd/streams/_definst_/" 
<Directory "applications/hd/streams/_definst_/"> 
    Options Indexes MultiViews FollowSymLinks 
    AllowOverride None 
    Order allow,deny 
    Allow from all 

Copy media files to the RootInstall/applications/hd/streams/_definst_/ folder to serve them over HTTP. For example, if a client requests, Apache serves it the someVideo.flv file from the RootInstall/applications/hd/streams/_definst_/ folder.

For more information about editing the configuration file, see the Apache documentation at

Deploying CGI programs

By default, Apache is configured with the following global aliases:






Accessible to anyone through an HTTP call.



Accessible only to Flash Media Server.

Apache assumes any file you place in the RootInstall/Apache2.2/cgi-bin folder is a CGI program. For example, if a client requests the URL, Apache attempts to execute the file RootInstall/Apache2.2/cgi-bin/

Files in the local-cgi-bin folder, on the other hand, are accessible only to Flash Media Server. If you have a CGI program used by server-side ActionScript, place it in the local-cgi-bin folder.

To change the location of the cgi-bin or the local-cgi-bin, edit the RootInstall/Apache2.2/conf/httpd.conf file.

Using Apache as a WebDAV host

You can configure the web server to act as a WebDAV host. For information, see the Apache HTTP Server version 2.2.9 documentation at

The following keywords are reserved words: open, close, send, idle, fcs, fms, crossdomain.xml, fpad. Reserved words cannot be used for directory names under the webroot directory or for anything else. If you have applications with these names, use custom aliases to give the HTTP virtual directories slightly different names from the RTMP applications, such as “open_”.