Skip to main content
Participant
March 12, 2009
Question

Confused about configurations for multiple vhosts/apps

  • March 12, 2009
  • 2 replies
  • 2946 views
My situation:

We've installed FMS on our dedicated server, which is also hosting about 50 websites. It's Linux based, running a Plesk control panel.

What I'd like to do is to have it such that as each hosting client signs up for the FMS service, we then go in and set up the necessary VHost/Application settings so that they can upload their .flv and .mp3 content to a folder in their site's directory, specify a connection string for their Flash player to play the conent
(e.g.
rtmp://www.WEBSITE_NAME.com/fms_app/ABS_PATH_TO_FILE
where ABS_PATH_TO_FILE points to
/var/www/vhosts/WEBSITE_NAME/httpdocs/ABS_PATH_TO_FILE
)

I have read and re-read the docs and tried setting up vhosts, applications and file repositories all over the place, reloaded the server many, many times, tested things out on the server... and I've never gotten things to work like I need them to. I've done my very best to follow what's described in the docs to no avail. It's been frustrating to say the least.

Here's my understanding of what I have to do to get this to work, and I'd appreciate any feedback anyone has as to why this isn't currently working, or a better way of getting this done.

For each hosting client (e.g. "www.angryclient.com")

  1. Set up a VHost. This is done by adding a folder in the /fms/conf/_defaultVHost_/ folder and the name of the folder MUST MATCH the client's domain I'm setting up the VHost for
    (i.e. /fms/conf/_defaultVHost_/angryclient.com).


  2. Set up an application for this VHost. I have attempted to set up an application in a folder in that hosting client's root folder, for organizational purposes (i.e. /var/www/vhosts/angryclient.com/APPLICATION_NAME) and then point the VHost to this application location via the <AppsDir> node in the /fms/conf/_defaultRoot_/angryclient.com/Vhost.xml file... but it has never worked, despite there being no indication to me anywhere that it wouldn't... so for the time being I've done a retreat back to keeping the node I mentioned set to:
    <AppsDir>${VHOST.APPSDIR}</AppsDir>

    I have also attempted to set up an application within the /fms/applications/ folder and it has ALSO not worked. I made a folder (e.g. /fms/applications/angry_client_app/) and copied all the necessary files into it (Application.xml and both "allowedDomains" txt files) and placed a test .flv file in. When running the FMS Admin Console it clearly shows up as an "application" (i.e. shows up in the "Applications" tab, under the "application name" column). However when I run fmscheck on the server I get the error message

    NetConnection.Connect.Rejected [ Server.Reject ] : (_defaultRoot_, angryclient.com) : Application (angry_client_app) is not defined.

    Only upon switching the appsdir node over to the default setting it shipped with, as I mentioned above, was I able to continue forwards to actually serving up test content as things stand.

    Also let me say that I want to set up a distinct application for each hosting client, yes? My thinking there is that it means that there's going to be clear, distinct usage and bandwidth stats for each client, and that furthermore I'll be able to restrict access to a particular domain via the allowedHTMLdomains.txt file in that application's folder, right?

  3. Set up a stream location that the client can easily FTP content up to. I want to make it so that, as I stated above, when a client has a Player they can specify a simple looking url
    (e.g. rtmp://angryclient.com/my_app/movies/playing_golf.flv)
    And have that point to a folder under their web root which they can FTP up to
    (e.g. httpdocs/movies/playing_golf.flv).

    To do this I'd set the value of the <Streams> node in the StreamManager -> VirtualDirectory nodes in the application's Application.xml file, right? Of course I haven't even gotten past the above hurdle of setting up a distinct application yet.... but when this is finished ... I'm referring to wherever I keep the client's application folder for organizational purposes (e.g. /var/www/vhosts/angryclient.com/APPLICATION_NAME/Application.xml)


Also I'm wondering - is there anyone else out there that has successfully set things up in the way I'm describing above? Or am I going into new territory here?

Thanks,
Hermes
    This topic has been closed for replies.

    2 replies

    March 13, 2009
    Hi Hermes,

    If each customer has their own domain name and IP address, you need to set up a unique adaptor for each -- you can assign an IP address or a port number to an adaptor, but not to a virtual host.. Each customer would have one adaptor and each adaptor would have the one default vhost. In the <HostPortList> tag of the Adaptor.xml file, you specify the IP address of the domain.

    When Flash Player or AIR calls rtmp://www.test.com/someapp, the name server translates the domain to the IP address, and the configured adaptor on FMS listens for that IP address and binds to it over whatever port(s) you have specified (1935 is the default for RTMP).

    FMS listens for that IP address and the adaptor binds to it -- It doesn't matter what folder name you give the adaptor or vhost -- it's just easy to use the customer's domain name.

    Phew. That said (and I hope it's all correct, if not, I hope someone jumps in), just to get this working, why don't you try leaving the AppsDir tag empty and place the app's folder in the default vhost folder. So if you've added a vhost called www.test.com, place the vod app here: conf\_defaultRoot_\www.test.com\vod.

    Hope this helps you move forward,
    Jody
    March 12, 2009
    Hi Hermes,
    Apologies on behalf of the FMS doc team. I'll help you get this done and update the docs as needed.

    1. The new vhost folder should be at the same level as the _defaultVHost_. This is a new vhost: fms\conf\_defaultRoot_\www.test.com

    See the last image on this page:
    http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WS5b3ccc516d4fbf351e63e3d119f2926bcf-7ffa.html

    2. Specify the location of the applications folder for the new vhost in the <AppsDir> tag of the fms\conf\_defaultRoot_\www.test.com\Vhost.xml file. If you leave the <AppsDir> tag empty, the applications folder is fms\conf\_defaultRoot_\www.test.com\.

    Sorry, I have to run to a few meetings, but I'll check-in later...
    Jody

    3. Are you planning to use the vod application? If so, copy it to the fms\conf\_defaultRoot_\www.test.com folder.

    2. To log in to the new vhost in the Admin Console, map the vhost name to an IP address, then enter the vhost name in the Server Address field of the Admin Console.
    Hermes25Author
    Participant
    March 12, 2009
    Jody:

    Thanks for your quick reply.

    quote:

    1. The new vhost folder should be at the same level as the _defaultVHost_. This is a new vhost: fms\conf\_defaultRoot_\www.test.com


    I've got that one - looks like I'm at least doing that right. However I DO have a question that I'm not sure is answered anywhere. Are there any ramifications to leaving off the "www." in the VHost folder name? And what of the opposite? If the VHost is set as "www.test.com" and someone is at the url " http://test.com" vs. " http://www.test.com" is there a problem?

    quote:


    2. Specify the location of the applications folder for the new vhost in the <AppsDir> tag of the fms\conf\_defaultRoot_\www.test.com\Vhost.xml file. If you leave the <AppsDir> tag empty, the applications folder is fms\conf\_defaultRoot_\www.test.com\.


    This, to me, appears to be the point I'm especially stuck at. I edit the
    /conf/_defaultRoot_/CLIENT_WEBSITE.com/Vhost.xml file

    and modify the AppsDir node as so:
    <AppsDir>/var/www/vhosts/CLIENT_WEBSITE.com/APP_NAME</AppsDir>

    And restart the FMS server, and then the application doesn't show up in the FMS Admin Console, and fmscheck tells me
    NetConnection.Connect.Rejected [ Server.Reject ] : (_defaultRoot_, CLIENT_WEBSITE.com) : Application (APP_NAME) is not defined.

    I've checked and rechecked the file path, made sure I've got all the necessary files in the application folder, made sure the permissions are totally open...
    I'm totally stuck at this point. If I could progress further then I could speak to the other points.

    Thanks again for your time.

    -Hermes