Edit a configuration file

Note:

Configuration files are located in the rootinstall/conf folder. For information about configuration file names, locations, and hierarchy, see Configuration folder structure.

To edit a configuration file, including ams.ini, do the following:

  1. Open the file in a text editor.

  2. Edit the file.

  3. Save the file.

  4. Validate the XML.

  5. Restart Adobe Media Server.

    If you modify the Users.xml file, restart Adobe Media Administration Server, too.

Editing parameters in the ams.ini file

The file rootinstall/config/ams.ini is the Adobe Media Server INI file. An INI file is a default configuration file. This file contains the most commonly edited configuration parameters. Edit the ams.ini file to change the server admin username and password, the adaptor host port, the folder that holds applications, the folder that holds media files, and so on.

The ams.ini file contains a list of parameters and their values, as in the following:

SERVER.ADMIN_USERNAME = admin

The XML configuration files use these parameters. The following is an excerpt from the User.xml file:

<UserList> 
    <!-- This tag defines an administrator for the server. --> 
    <User name="${SERVER.ADMIN_USERNAME}"> 
        <!-- Salted Password Hash for this vhost administrator. --> 
        <Password encrypt="true">6cb340fd77d3297cb6d82f57bb085a13d 
f45cd9513d042355a9a304c1d47ec433c97a8bdc2584424</Password>

When the server starts, it replaces the parameter in the XML configuration files with the value from the ams.ini file.

Edit the ams.ini file

  1. Open rootinstall/conf/ams.ini in a text editor.

  2. Save a copy to another location as a backup.

  3. Enter a new value for a parameter.

  4. Save the file.

  5. Restart Adobe Media Server. When you edit a value in the User.xml file, restart Adobe Media Administration Server.

  6. Open the Administration Console and log in with your new password.

Using symbols in configuration files

To simplify configuration, you can use symbols as values for XML elements in configuration files. Create a file named substitution.xml in the rootinstall/conf folder that maps the symbols to strings that the server substitutes when it reads the configuration files. After you’ve set up a map file, future updates are faster: you can edit the map file instead of editing each configuration file.

The installer defines a few mappings during the installation process and stores them in the ams.ini file. When the server starts, it looks for the ams.ini file and the substitution.xml file in the rootinstall/conf directory. You can also create additional map files and reference them from the substitution.xml file.

The server has two predefined symbols, ROOT and CONF, that are always available. The ROOT symbol is mapped to the location of the AMSMaster.exe file and the CONF symbol is mapped to the location of the Server.xml file.

The server builds the symbol map in the following order:

  1. The predefined symbols ROOT and CONF are evaluated.

  2. The ams.ini file is evaluated.

  3. If the substitution.xml file exists, the server looks for the Symbols tag and processes the child tags in the order in which they appear.

  4. The server processes the additional map files in the order in which they appear (in KeyValueFile elements in the substitution.xml file).

  5. Symbols defined in external map files are processed in the order in which they appear in each file.

Create a substitution.xml file:

  1. Create a new XML file and save it in the rootinstall/conf folder as substitution.xml.

  2. Enter the following XML structure:

     <Root> 
         <Symbols> 
             <SymbolName>StringToMapTo</SymbolName> 
         </Symbols> 
     </Root>

    Add a SymbolName element for each symbol you want to create.

  3. For example, this substitution.xml file maps the symbol TESTUSERNAME to the value janedoe:

     <Root> 
         <Symbols> 
             <TESTUSERNAME>janedoe</TESTUSERNAME> 
         </Symbols> 
     </Root>
  4. Open the rootinstall/conf/Users.xml file in a text editor.

  5. Locate the line <User name="${SERVER.ADMIN_USERNAME}"> and replace the symbol SERVER.ADMIN_USERNAME with the symbol TESTUSERNAME.

    When the server reads the XML file, it substitutes the value from the substitution.xml file as follows:

     <User name="janedoe">

    Note:

    Because this symbol is used as an attribute, it is surrounded by quotation marks. If the symbol were used as a regular value, it would not be surrounded by quotation marks.

  6. Restart the Administration Server.

Note:

If you change the Users.xml file, you must restart the Administration Server. If you change any other XML configuration file, you must restart the server.

Creating additional map files

You can specify all of your text substitution mappings under the Symbols tag in substitution.xml. However, you can also create additional map files. To do this, create one or more KeyValueFile elements in the substitution.xml file. Each element can hold the location of one external file.

For example, the following references the file C:\testfiles\mySymbols.txt:

 <Root> 
     <KeyValueFile>C:\testfiles\mySymbols.txt</KeyValueFile> 
 </Root>

These external files are not in XML format. They simply contain a collection of symbol-value pairs, where each pair appears on a separate line and takes the following form:

 symbol=value

The following example shows three symbol-value pairs:

 USER_NAME=foo 
 USER_PSWD = bar 
 HELLO= "world and worlds"

Place comments on separate lines that begin with a number sign (#). Do not place comments on the same line as a symbol definition.

The first equal sign (=) in a line is considered the delimiter that separates the symbol and the value. The server trims leading or trailing white space from both the symbol and the value, but no white space within double quotation marks.

Using environment variables

To refer to an environment variable in one of the XML configuration files, use the name of the environment variable within percent (%) characters. The % characters indicate to the server that the symbol refers to an environment variable and not to a user-defined string.

The syntax for specifying an environment variable as a symbol is ${%ENV_VAR_NAME%}.

For example, the server maps the following symbol to the COMPUTERNAME variable:

 ${%COMPUTERNAME%}

When you use an environment variable, you don’t have to define it in the substitution.xml file.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy