转载:http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WSE2A5A7B9-E118-496f-92F9-E295038DB7DB.html
Configuring Apache HTTP Server
About Apache HTTP ServerFlash 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 isRootInstall/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 locationsThe Apache server that installs with Flash Media Server differs from a standard Apache installation in the following ways:
Alternate configurationsTo do any of the following, edit the RootInstall/Apache2.2/conf/httpd.conf file:
Enable ApacheWhen 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.
Configure HTTP proxyingFlash 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 theHTTPPROXY.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: HTTPPROXY.HOST = :8134 Setting the parameter to no value disables HTTP proxying: HTTPPROXY.HOST = To proxy to a remote server, set the parameter to the remote server you want to use: HTTPPROXY.HOST = webfarm.example.com:80 Deliver SWF files and HTML files over HTTPApache 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:
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 applicationsTo 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 theRootInstall/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 </Directory> Copy media files to the RootInstall/applications/hd/streams/_definst_/ folder to serve them over HTTP. For example, if a client requests http://fms.example.com/hd/someVideo.flv, Apache serves it the someVideo.flv file from theRootInstall/applications/hd/streams/_definst_/ folder. For more information about editing the configuration file, see the Apache documentation atwww.apache.org. Deploying CGI programsBy default, Apache is configured with the following global aliases:
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 http://fms.example.com/cgi-bin/someScript.pl, Apache attempts to execute the fileRootInstall/Apache2.2/cgi-bin/someScript.pl. 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 hostYou can configure the web server to act as a WebDAV host. For information, see the Apache HTTP Server version 2.2.9 documentation atwww.apache.org. 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_”. |