Icon Configuring the Web Server

You can configure the web server by completing the following steps.

1. Start the web server (ewbsrvr.exe) as an application by clicking on the link for the "Elevate Web Builder 2 Web Server".

Image

2. Access the web server configuration options:

a. In the system tray, right-click on the web server icon to bring up the server menu, and click on the Restore option on the server menu.

Image

b. Using the main toolbar, click on the Stop Server button.

Image

c. Using the main toolbar, click on the Configure Server button to open the Server Configuration Dialog.

Image

d. Use the information below under the Server Configuration Dialog heading to configure the web server according to your needs. When done configuring the server, click on the OK button to save the changes.

e. Using the main toolbar, click on the Start Server button.

Image

f. Click on the close button in the upper-right-hand corner of the web server window to close the server window.

Image

Server Configuration Dialog
The Server Configuration dialog allows you to configure the following aspects of the web server:
  • The server name, description, and hosted domain

  • The IP address, port, and timeout settings for connections

  • The authorization information for incoming connections

  • The content folder, default document, cross-origin resource sharing, and resource names

  • The databases and datasets defined for the web server

  • The modules added to the web server
Image

Server
The Server page provides options for modifying the general web server settings.

Image

OptionDescription
NameIdentifies the web server. This value is not used for named server instances (see below Multiple Server Instances for more information on named server instances). The default value is 'ewbsrvr'
DescriptionUsed in conjunction with the name to give more information about the web server to clients once they have connected to the web server. The default value is 'Elevate Web Builder 2 Web Server'.
DomainIdentifies the domain that is being hosted by the web server. The default value is '', meaning that any domain can be hosted by the web server. If a value is provided, then it will be used to limit connections to the web server to those that pass the same value (case-insensitive) in the Host header along with each HTTP request.

Connections
The Connections page provides options for modifying the connection settings for the web server.

Image

OptionDescription
IP AddressSpecifies the IP address that the web server should bind to when listening for incoming connections from clients. The default value is blank (""), which specifies that the web server should bind to all available IP addresses.
PortSpecifies the port that the web server should bind to when listening for incoming connections from clients. The default value is 80.
Maximum Request SizeSpecifies the maximum size of any incoming request from a client. Clients will often send content as part of HTTP POST requests, and this setting acts as a governor to prevent a client from intentionally or unintentionally crashing the web server by exhausting all available memory. The default value is 16,777,216 bytes, or 16MB.
Connection TimeoutSpecifies how long the web server should wait for a request from a connection before it terminates the connection. This is done to keep the number of concurrent connections to a minimum, while still allowing for multiple web browser requests on the same connection. The default value is 30 seconds.
Thread Cache SizeSpecifies the number of threads that the web server should actively cache for connections. When a thread is terminated in the server it will be added to this thread cache until the number of threads cached reaches this value. This allows the web server to re-use the threads from the cache instead of having to constantly create/destroy the threads as needed, which can improve the performance of the web server if there are many connections and disconnections occurring. The default value is 10.

Authorizations
The Authorizations page provides options for modifying the authorization information for the web server.

Image

OptionDescription
Administrator NameSpecifies the administrator's name. The default value is 'Administrator'.

Information The administrator name and password are not used currently, but will be in the future for remote administration of the web server.
Administrator PasswordSpecifies the administrator's password. The default value is 'EWBDefault'.

Information The administrator name and password are not used currently, but will be in the future for remote administration of the web server.
Administrator EmailSpecifies the administrator's email address, which is used in web server response headers to indicate the point of contact for the organization in case of errors, etc. The default value is ''.
Authorized IP AddressesSpecifies which IP addresses are authorized to access the web server. This is commonly referred to as a "white list". There is no limit to the number of addresses that can be specified, and the IP address entries may contain the asterisk (*) wildcard character to represent any portion of an address.

Information Due to the way that .ini file entries must be specified, multiple addresses must be separated with the literal value "<#CR#><#LF#>" (without the quotes) instead of actual line feeds.
Blocked IP AddressesSpecifies which IP addresses are not allowed to access the web server. This is commonly referred to as a "black list". There is no limit to the number of addresses that can be specified, and the IP address entries may contain the asterisk (*) wildcard character to represent any portion of an address.

Information Due to the way that .ini file entries must be specified, multiple addresses must be separated with the literal value "<#CR#><#LF#>" (without the quotes) instead of actual line feeds.

Content
The Content page provides options for modifying the content settings for the web server.

Image

OptionDescription
Content FolderSpecifies the path that the web server should use for all static content, including Elevate Web Builder applications (*.js, *.html) and any other external files such as images. The default value is ''.
Default DocumentSpecifies the default document file name to use if a URL requested by a client does not include a file name. For example, if the client makes a request to the URL "http://www.mydomain.com", then this value will be appended to the URL (prefixed with a slash) and the combined URL will be used instead. The default value is ''.
Enable Cross-Origin Resource SharingSpecifies that the web server will allow and handle cross-origin resource sharing. This feature allows the web server to serve static and database content in response to requests from origins (domain name and port number) that are different than that of the web server. Normally, web browsers don't permit such cross-origin requests unless the web server specifically allows them. The default value is False.

For a good discussion of Cross-Origin Resource Sharing, please visit the following link:

HTTP access control (CORS)

Information The Elevate Web Builder Web Server supports both simple and preflighted requests, but does not support requests with credentials at this time.
Databases Resource NameSpecifies the resource name to use for the automatic database handling built into the web server. The default value is 'databases'. Please see the Web Server Request Handling topic for more information on how this resource name is used in database requests.
Database Modules Resource NameSpecifies the resource name to use for any database modules added to the web server (see next). The default value is 'databasemodules'. Please see the Web Server Request Handling topic for more information on how this resource name is used in database requests.
Modules Resource NameSpecifies the resource name to use for any web server modules added to the web server. The default value is 'modules'. Please see the Web Server Request Handling topic for more information on how this resource name is used in module requests.

Databases
The Databases page provides options for modifying the defined databases and datasets used by the web server.

Image

Adding a New Database
Use the following steps to add a new database:
  • Click on the Add button under the list of databases.


  • The database editor dialog will appear. Please refer to the next section for information on defining the database.
Defining a Database
The database editor dialog consists of 2 pages:
  • General - the database engine/server type, the name of the database, and the description.

    Image

    Currently, the following database engines are supported:

    ElevateDB
    DBISAM
    ADO (includes OLEDB/ODBC)


  • Connection Properties - the name/location of the database and other configuration properties essential to establishing a proper connection to the desired database. The options on this page are specific to the database engine selected on the first page.

    Image

    Once the connection properties are set, you can use the Test Connection button to verify that everything is set properly. Please see your database engine manual/documentation for more information on the proper value for each property setting.


  • Once you have properly set the connection properties and successfully tested the connection to the database, click on the OK button to close the database dialog and save the database.
Editing an Existing Database
To edit an existing database, simply double-click on the desired database in the list of databases. The database editor dialog will then appear, and you can use it to modify the database accordingly.

Removing a Database
Use the following steps to remove a database:
  • Click on the name of the database that you wish to remove.


  • Click on the Remove button under the list of databases.


  • A confirmation dialog will be displayed, asking you to confirm the removal of the database. Click on the Yes button to continue, or the No button to cancel the removal.
Importing Databases from the IDE
In order to import databases from the Elevate Web Builder IDE, both the IDE and the web server must be running on the same machine. The import process currently only imports the database definitions directly from the IDE's .ini file.

Warning Importing the databases from the IDE will cause all existing databases defined for the web server to be replaced with those from the IDE. Please make sure that this is the desired outcome before proceeding.

To begin the import process, simply click on the Import button under the list of databases.

Adding a New DataSet
Use the following steps to add a new dataset:
  • Be sure that you have selected an existing database by clicking on the desired existing database.


  • Click on the Add button under the list of datasets for the currently-selected database.


  • The dataset editor dialog will appear. Please refer to the next section for information on defining the dataset.
Defining a DataSet
The dataset editor dialog consists of 3 pages:
  • General - the name of the dataset and the description.

    Image


  • Row Source - the actual source of the dataset rows can be an actual table name from the selected database, or it can be an SQL SELECT statement.

    Image

    Elevate Web Builder uses a special parameter naming syntax for queries, and does not use the native parameter functionality in the target database engine. This is done because some database engines do not support named parameters, or do not support parameter type discovery or enumeration. When the dataset rows are requested from the internal web server embedded in the IDE, it automatically populates the named parameters in the query by using the URL "name=value" parameters passed with the dataset rows request. These parameters can be specified in the application via the TDataSet Params property.


  • Preview - use the preview page to make sure that the dataset is returning the correct rows. Any default values for parameters defined on the Row Source page are applied for the preview, so if you have not defined any default parameter values you may see zero rows displayed.

    Image
Editing an Existing DataSet
To edit an existing dataset, simply double-click on the desired dataset in the list of datasets. The dataset editor dialog will then appear, and you can use it to modify the dataset accordingly.

Removing a DataSet
Use the following steps to remove a dataset:
  • Click on the name of the dataset that you wish to remove.


  • Click on the Remove button under the list of datasets for the currently-selected database.


  • A confirmation dialog will be displayed, asking you to confirm the removal of the dataset. Click on the Yes button to continue, or the No button to cancel the removal.
Modules
The Modules page provides options for adding and removing modules (*.dll) that were created using Embarcadero RAD Studio and Delphi and an Elevate Web Builder Module template project from the repository in the RAD Studio IDE. Adding modules to the web server allows the modules to be used to respond to requests and provide content to the Elevate Web Builder application running in the web browser.

Image

Adding a Module

In order to add a module, complete the following steps:
  • Click on the Add button


  • The Add Module dialog will appear.

    Image

    In the dialog, specify the file name of the module (.dll) that you wish to add to the web server. You can type in the file name directly, or use the browse button (...) to select the module using a common Windows file dialog. If you use the browse button, the module description and version will be populated from the module after the file is selected. The description and version are read directly from the .dll's version information.


  • Click on the OK button. If the specified file is a valid Elevate Web Builder module, then the module will be added to the web server. If the specified file is not a valid module file, then an error message will be displayed indicating any issues with the module file.
Removing a Module

In order to remove a module, complete the following steps:
  • Select an existing module from the list of modules.


  • Click on the Remove button.
Information If you remove a module that is used by Elevate Web Builder applications, then you will experience errors in these applications when they try to execute requests that reference these modules in the URL for the request.

Please see the Creating Web Server Modules topic for more information how the modules work.

Configuration Reference
The web server stores its configuration information in an .ini file that is, by default, located in the following directory under Windows XP/2003 Server:

C:\Documents and Settings\All Users\Application Data\Elevate Software\Elevate Web Builder 2 Web Server

in the following directory under Windows Vista or higher (including Windows 7 and Server 2008):

C:\ProgramData\Elevate Software\Elevate Web Builder 2 Web Server

The name of the .ini configuration file is determined by the name of the application. For example, for the ewbsrvr.exe application, the name of the .ini file would be ewbsrvr.ini.

Information If the web server finds an .ini with the proper name in the same directory as the server .exe, it will use it instead of the .ini file in the common application data directory for Windows.

All of the configuration entries in the web server .ini configuration files are stored under a section called "Server".

Information Please see the Multiple Server Instances topic for how multiple server instances can change this naming slightly.

Each of the individual configuration entries in this section are as follows:

Configuration EntryDescription
No User InterfaceSpecifies that the server will run without a user interface. This is useful in situations where you don't want the server to display an interface or an icon in the system tray, such as when running the server as a Windows service. The default value is 0 (False). Setting this entry to 1 (True) will turn off the server UI.
Server NameIdentifies the web server. This configuration item is not used for named server instances (see below Multiple Server Instances for more information on named server instances). The default value is 'ewbsrvr'.
Server DescriptionUsed in conjunction with the "Server Name" configuration entry to give more information about the web server to external clients once they have connected to the web server. The default value is 'Elevate Web Builder Web Server'.
DomainIdentifies the domain that is being hosted by the web server. The default value is '', meaning that any domain can be hosted by the web server. If a value is provided, then it will be used to limit connections to the web server to those that pass the same value (case-insensitive) in the Host header along with each HTTP request.
IP AddressSpecifies the IP address that the web server should bind to when listening for incoming connections from web browsers. The default value is blank (""), which specifies that the web server should bind to all available IP addresses.
PortSpecifies the port that the web server should bind to when listening for incoming connections from web browsers. The default value is 80.
Max Request SizeSpecifies the maximum size of any incoming request from a client. Clients will often send content as part of HTTP POST requests, and this setting acts as a governor to prevent a client from intentionally or unintentionally crashing the web server by exhausting all available memory. The default value is 16,777,216 bytes, or 16MB.
TimeoutSpecifies how long the web server should wait for a request from a connection before it terminates the connection. This is done to keep the number of concurrent connections to a minimum, while still allowing for multiple web browser requests on the same connection. The default value is 30 seconds.
Thread Cache SizeSpecifies the number of threads that the web server should actively cache for connections. When a thread is terminated in the server it will be added to this thread cache until the number of threads cached reaches this value. This allows the web server to re-use the threads from the cache instead of having to constantly create/destroy the threads as needed, which can improve the performance of the web server if there are many connections and disconnections occurring. The default value is 10.
Admin NameSpecifies the administrator's name. The default value is 'Administrator'.

Information The administrator name and password are not used currently, but will be in the future for remote administration of the web server.
Admin PasswordSpecifies the administrator's password. The default value is 'EWBDefault'.

Information The administrator name and password are not used currently, but will be in the future for remote administration of the web server.
Admin EmailSpecifies the administrator's email address, which is used in web server response headers to indicate the point of contact for the organization in case of errors, etc. The default value is ''.
Authorized AddressesSpecifies which IP addresses are authorized to access the web server. This is commonly referred to as a "white list". There is no limit to the number of addresses that can be specified, and the IP address entries may contain the asterisk (*) wildcard character to represent any portion of an address.

Information Due to the way that .ini file entries must be specified, multiple addresses must be separated with the literal value "<#CR#><#LF#>" (without the quotes) instead of actual line feeds.
Blocked AddressesSpecifies which IP addresses are not allowed to access the web server. This is commonly referred to as a "black list". There is no limit to the number of addresses that can be specified, and the IP address entries may contain the asterisk (*) wildcard character to represent any portion of an address.

Information Due to the way that .ini file entries must be specified, multiple addresses must be separated with the literal value "<#CR#><#LF#>" (without the quotes) instead of actual line feeds.
Content FolderSpecifies the path that the web server should use for all static content, including Elevate Web Builder applications (*.js, *.html) and external files like images. The default value is ''.
Default DocumentSpecifies the default document file name to use if a URL requested by a client does not include a file name. For example, if the client makes a request to the URL "http://www.mydomain.com", then this value will be appended to the URL (prefixed with a slash) and the combined URL will be used instead. The default value is ''.
Enable Cross Origin ResourcesSpecifies that the web server will allow and handle cross-origin resource sharing. This feature allows the web server to serve static and database content in response to requests from origins (domain name and port number) that are different than that of the static and database content. Normally, web browsers don't permit such cross-origin requests unless the web server specifically allows them. The default value is False.
Databases Resource NameSpecifies the resource name to use for the automatic database handling built into the web server. The default value is 'databases'. Please see the Web Server Request Handling topic for more information on how this resource name is used in database requests.
Database Modules Resource NameSpecifies the resource name to use for any database modules added to the web server (see next). The default value is 'databasemodules'. Please see the Web Server Request Handling topic for more information on how this resource name is used in database requests.
Modules Resource NameSpecifies the resource name to use for any web server modules added to the web server. The default value is 'modules'. Please see the Web Server Request Handling topic for more information on how this resource name is used in module requests.
Image