Skip to main content

Administrating MarkLogic Server

Creating a New HTTP Server

To create a new server, follow these steps:

  1. Log into the Admin Interface.

  2. Click the Groups icon in the left tree menu.

  3. Click the group in which you want to define the HTTP server (for example, Default).

  4. Under the group name, click App Servers on the left tree menu.

  5. Click the Create HTTP tab. The Create HTTP Server page appears.

  6. In the server name field, enter a shorthand name for this HTTP server. MarkLogic Server will use this name to refer to this server on display screens in the Admin Interface.

  7. In the root field, enter the name of the directory in which you will store your programs. If the modules field is set to a database, then the root must be a directory URI in the specified modules database.

    If the modules field is set to (file system), then the root directory is either a fully-qualified pathname or is relative to the directory in which MarkLogic Server is installed. The following table shows the default installation directory for each platform:

    Platform

    Program Directory

    Microsoft Windows

    C:\Program Files\MarkLogic

    Red Hat Linux

    /opt/MarkLogic

    Mac OS X

    ~/Library/MarkLogic

    Note

    Unless you specify a shared drive, all hosts in the group will need to have a copy of the programs in the directory specified above.

    Warning

    Do not create HTTP server root directories named Docs, Data, or Admin. These directories are reserved by MarkLogic Server for other purposes. Creating HTTP server root directories with these names can result in unpredictable behavior of the server and may also complicate the software upgrade process.

  8. In the port field, enter the port number through which you want to make this HTTP server available. The port number must not be assigned to any other HTTP, ODBC, XDBC, or WebDAV server.

  9. In the modules field, select the database to use as the modules database for your documents, or leave it at the default of storing your modules on the file system. For information on what a modules database is, see Modules Database.

  10. In the database field, select the database to be accessed by this HTTP server. Multiple HTTP, ODBC, XDBC, and WebDAV servers can access the same database.

  11. Scroll down to the authentication field. Select an authentication scheme, as described in Types of Authentication in Securing MarkLogic Server. The default is digest, which uses encrypted passwords.

    If you select application-level, you will also need to fill in a default user. Anyone accessing the HTTP server is automatically logged in as the default user until the user logs in explicitly.

    Warning

    If you use an admin user (admin) as the default user (an authorized administrator with the admin role), then everyone who uses this app server is automatically a user with the admin role, which effectively turns off security for this app server.

  12. Scroll to the privilege field near the bottom of the screen. This field represents the privilege needed to access (login to) the server.

  13. Set any other properties for this app server, as appropriate to your needs:

    • last login and display last login are described in Storing and Monitoring the Last User Login Attempt.

    • backlog specifies the maximum number of pending connections allowed on the HTTP server socket.

    • threads specifies the maximum number of app server threads allocated to this port by each server in the cluster.

    • request timeout specifies the maximum number of seconds before a socket receives a timeout for the first request.

    • keep alive timeout specifies the maximum number of seconds before a socket receives a timeout for subsequent requests over the same connection.

    • session timeout specifies the maximum number of seconds before an inactive session times out.

    • max time limit specifies the upper bound for any request's time limit. No request may set its time limit (for example with xdmp:set-request-time-limit()) higher than this number. The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The app server gives up on queries which take longer, and returns an error.

    • default time limit specifies the default value for any request's time limit, when otherwise unspecified. A request can change its time limit using xdmp:set-request-time-limit(). The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The app server gives up on queries which take longer, and returns an error.

    • static expires adds an "expires" HTTP header for static content to expire after this many seconds.

    • pre-commit trigger limit specifies the maximum number of pre-commit triggers a single statement against this app server can invoke. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer's Guide.

    • pre-commit trigger depth specifies the maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) for pre-commit triggers that are executed against this app server. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer's Guide.

    • collation specifies the default collation for queries run in this app server. This will be the collation used for string comparison and sorting if none is specified in the query. For details, see Encodings and Collations in the Search Developer's Guide.

    • concurrent request limit specifies the maximum number of requests any user may have running at a specific time. 0 indicates no maximum. For details, see Managing Concurrent User Requests.

    • log errors specifies whether to log uncaught errors for this app server to the ErrorLog.txt file . This is useful to log exceptions that might occur on an app server for later debugging.

    • debug allow specifies whether to allow requests against this app server to be stopped for debugging, using the MarkLogic Server debugging APIs.

    • default xquery version specifies the default XQuery language for this app server if an XQuery module does explicitly declare its language version.

    • multi version concurrency control specifies how strict queries behave about getting the latest timestamp. This only affects query statements, not update statements. For details about queries and transactions in MarkLogic Server, see Understanding Transactions in MarkLogic Server in the Application Developer’s Guide.

    • The error handler and url rewriter fields are described in Controlling App Server Access, Output, and Errors in the Application Developer's Guide.

    • The properties associated with SSL support are described in Configuring SSL on App Servers in Securing MarkLogic Server.

  14. Scroll to the top or bottom and click OK.

The HTTP server is now created. Creating an HTTP server is a “hot” admin task; the changes take effect immediately. For information and setup instructions for managing user sessions and/or keeping track of login attempts, see Managing User Requests and Monitoring Login Attempts.