Installing the RAD Server or the RAD Server Console on a Production Environment on Windows

From RAD Studio
Jump to: navigation, search

Go Up to Setting Up Your RAD Server Engine

Go Up to Setting Up Your RAD Server Console


For a production environment, we recommend to set up the RAD Server Engine and the RAD Server Console on a web server. We currently support Microsoft IIS Server and Apache Server.

You need the InterBase database and configuration file (.ini). To create these files for the first time follow the steps in Configuring Your RAD Server Engine or RAD Server Console on Windows.

Note: If you have a RAD Server license to install InterBase 2017 encrypted database in your production environment, you need to first follow the steps in RAD Server Database Requirements for a Production Environment on Windows.

The default path to the EMSServer.IB and EMSServer.ini files is:

  • C:\Users\Public\Documents\Embarcadero\EMS\
Note: Edit the ini file with the location to the database after creating it. Check that InterBase server is running.

Locating Binary Files that RAD Server Engine Requires

To run the RAD Server Engine in a different machine from the one you installed RAD Studio, you need the following files that you can find in the installation folders of the dlls:

For Microsoft IIS Support (Windows ISAPI):

  • borlndmm.dll
  • CustomIPTransport280.bpl
  • dbrtl280.bpl
  • EMSConsole.dll
  • EMSServer.dll
  • emsserverapi280.bpl
  • FireDAC280.bpl
  • FireDACCommon280.bpl
  • FireDACCommonDriver280.bpl
  • rtl280.bpl
  • FireDACIBDriver280.bpl
  • IndyCore280.bpl
  • IndyIPClient280.bpl
  • IndyIPCommon280.bpl
  • IndyProtocols280.bpl
  • IndySystem280.bpl
  • inet280.bpl
  • xmlrtl280.bpl
  • If you use FireDAC with a database management system other than InterBase, you need its FireDAC driver, such as FireDACSqliteDriver280.bpl for SQLite.

For Apache Server Support:

  • emsserverapi280.bpl
  • FireDACCommon280.bpl
  • FireDACCommonDriver280.bpl
  • FireDACIBDriver280.bpl
  • IndyCore280.bpl
  • IndyIPClient280.bpl
  • IndyIPCommon280.bpl
  • IndyProtocols280.bpl
  • IndySystem280.bpl
  • inet280.bpl
  • mod_emsserver.dll
  • rtl280.bpl
  • xmlrtl280.bpl
  • If you use FireDAC with a database management system other than InterBase, you need its FireDAC driver, such as FireDACSqliteDriver280.bpl for SQLite.

If you have created one or more packages of custom RAD Server resources, you must build them into package shared library files, which you need as well.

Microsoft IIS Support (Windows ISAPI)

The dlls to configure both the RAD Server Engine and RAD Server Console running on an IIS Server (EMSServer.dll and EMSConsole.dll) are located in the following folders:

  • Windows 32 bits: C:\Program Files (x86)\Embarcadero\Studio\22.0\bin
  • Windows 64 bits: C:\Program Files (x86)\Embarcadero\Studio\22.0\bin64

Follow these steps to set up your RAD Server Engine or Console running on a IIS Server.

Installing IIS 7

  1. Go to Control Panel > Programs and Features > Turn Windows features on or off.
    Note: This requires Privileged mode.
  2. Expand the Internet Information Services node of the Windows Features dialog box and then:
    • In Web Management Tools, check IIS Management Console.
    • In World Wide Web Services, expand the Application Development Features and then check ISAPI Extensions and ISAPI Filters.
    • In World Wide Web Services, expand the Common HTTP Features and make sure that Default Document, Directory Browsing, HTTP Errors, and Static Content are checked as well.
  3. Click OK to start the installation.

Checking IIS 7

  1. After installing IIS 7, open the URL http://localhost/ with a regular browser to make sure IIS is running and working.
    Note: You might need to check your firewall settings and add an exception for port 80 TCP traffic if necessary.

Creating a New Site

Add a new site:

  1. Go to C:\inetpub\wwwroot and create a new folder, for example emsconsole or emsserver.
  2. Paste the created EMSServer.ini file in Configuring Your RAD Server Engine or RAD Server Console on Windows (default location is C:\Users\Public\Documents\Embarcadero\EMS\) on the folder.
  3. Copy the required binary files into the folder.
  4. (Only for the RAD Server Console) Copy the webresources folder from C:\Program Files (x86)\Embarcadero\Studio\22.0\ObjRepos\en\EMS to C:\inetpub\wwwroot\emsconsole.
    Note: When an application uses FireDAC persistent connection definitions or externally configured FireDAC drivers, then FDConnectionDefs.ini and FDDrivers.ini files must be copied into the created folder.

Configuring EMSServer.ini File (only for the Console)

Edit the EMSServer.ini file as follows:

[Console.Paths.ISAPI]
ResourcesFiles= C:\inetpub\wwwroot\emsconsole\
Note: You need to restart the IIS Server for the changes to take effect.

Configuring IIS 7 for the ISAPI DLL

  1. Open Internet Information Service Manager (requires Privileged mode).
    Tip: Enter Inetmgr on Search programs and files to open the IIS Manager.
  2. Select the folder (emsserver or emsconsole) under Sites > Default Web Site.
  3. Right-click on the emsserver or emsconsole folder and select Convert to Application.
  4. Double-click Handler Mappings. This opens the Handler Mappings window.
  5. Select ISAPI-dll. It appears grayed.
  6. Click Edit from the Actions panel.
  7. On the Executable (optional) field enter the path to the dll file and click Open:
    • emsserver.dll, for example C:\inetpub\wwwroot\emsserver\emsserver.dll
    • emsconsole.dll, for example C:\inetpub\wwwroot\emsconsole\emsconsole.dll.
  8. Click OK, then click Yes.
  9. Click Edit Feature Permissions… in Actions panel.
  10. An Edit Feature Permission dialog opens.
  11. Check Execute.
  12. Click OK to commit the changes.

Enabling ISAPI Modules

  1. Click the root node from the Connections tree.
  2. Double-click ISAPI and CGI Restrictions.
  3. Click Edit Feature Settings … in the Actions panel.
  4. Check the Allow unspecified ISAPI modules option. This option allows any ISAPI dll to be executed under IIS. If you do not use this option, you need to specify a list of ISAPI DLLs explicitly.
  5. Click OK.

Enabling 32 bits ISAPI DLL on IIS 7 x64

This is only required if you are using IIS 7 x64 and you would like to run 32 bits ISAPI DLL on the IIS. If your ISAPI DLL and IIS7 are both x86 or both x64, you may skip this step.

  1. Click Application Pools node.
  2. Click DefaultAppPool item.
  3. Click Advanced Settings … from the Actions panel.
  4. An Advanced Settings dialog opens.
  5. Set Enable 32-bits Applications to True.
  6. Click OK to commit the changes.

Configuring IIS to Allow Cross Domain Requests

If your Web Server is hosting the Web files resources of an RAD Server Console and you want to allow HTTP requests from different domains, you need to set up the HTTP-Response-Header.

  1. Go to C:\inetpub\wwwroot and create a new folder, for example Web files folder.
  2. Paste the web files resources folders under webfilesresources.
    Note: You can not change the webresources folder name.
  3. Open Internet Information Service Manager.
  4. Select the Web files folder (webfilesresources) under Sites > Default Web Site.
  5. Double-click HTTP Response Headers.
  6. Click Add in the Actions panel.
  7. Enter one of the following configurations (Name: Value):
    • Access-Control-Allow-Origin: *
    • (More restrictive option) Access-Control-Allow-Origin: http://domain:port/
  8. Click OK to commit the changes.


Apache Server Support

You can find the RAD Server Apache server module (mod_emsserver.dll and the mod_emsconsole.dll) in the following locations:

  • Windows 32 bits: C:\Program Files (x86)\Embarcadero\Studio\22.0\bin
  • Windows 64 bits: C:\Program Files (x86)\Embarcadero\Studio\22.0\bin64

Follow these steps to set up your RAD Server Engine or Console running on an Apache Server.

  1. Download and install Apache HTTP Server for Windows.
    Note: RAD Server Engine (EMS Server) only runs in Apache HTTP Server versions 2.0, 2.2, and 2.4.
  2. Copy the RAD Server Apache server module (mod_emsserver.dll) or the RAD Server Apache console module (mod_emsconsole.dll) to a location:
    • For example, you can create the C:/mod folder.
  3. Configure the Apache HTTP Server to load the RAD Server Apache server and RAD Server Apache console modules. Edit the httpd.conf file.
    • Add the following line to load the RAD Server Apache server module (mod_emsserver.dll)
     LoadModule emsserver_module C:/mod/mod_emsserver.dll
    
    • Add the following line to load the RAD Server Apache console module (mod_emsconsole.dll)
     LoadModule emsconsole_module C:/mod/mod_emsconsole.dll
    
    Note: According to the Apache Documentation, add the '_module' suffix to the module name; Otherwise, Apache does not load the module.
    • Add the Location tags to create a container where you can specify access control rules for a given URL.
     <Location /ems-server>
       SetHandler mod_emsserver-handler
     </Location>
    
     <Location /ems-console>
       SetHandler mod_emsconsole-handler
     </Location>
    
  4. Change the Listen to change the default listener port. For example, change it to 8085.
    Listen 8085
  5. (Only for the RAD Server Console) Copy the webresources folder (from C:\Program Files (x86)\Embarcadero\Studio\22.0\ObjRepos\en\EMS) to the folder where you copied the Apache modules dlls (C:/mod).
  6. To check if the RAD Server Apache server module is properly running, open a web browser and type: http://localhost:8085/ems-server/version
  7. You can access the RAD Server Apache console module by accessing: http://localhost:8085/ems-console/

Configuring EMSServer.ini File (only for the Console)

Edit the EMSServer.ini file as follows:

[Console.Paths.Apache]
ResourcesFiles = C:\mod\
;WebFiles =
Note: You need to restart the Apache Server for the changes to take effect.

See Also