Applies to ReadyAPI 3.0, last modified on November 19, 2019

VirtServer stores its settings in the virt-server.yml settings file.

Location

The location where VirtServer searches for the settings file depends on the operating system and on the permissions VirtServer or its installer has:

  • Windows

    <user folder>/.readyapi/virt-server/virt-server.yml

  • Linux and macOS

    If you installed or if you run VirtServer with root access (sudo <path>/virtserver.sh):

    /etc/virt-server.yml

    Without root access:

    <user folder>/.readyapi/virt-server/virt-server.yml

  • VirtServer 2.0.1 and earlier

    <VirtServer>/bin/virt-server.yml

Note: VirtServer loads the settings file from the locations mentioned above by default. You can create your own settings file and specify it in the VirtServer command line. This will not work if you run VirtServer as a service (daemon), though.

Settings

Some settings in this .yml file are for internal use by VirtServer. We recommend that you be careful when changing the file. If something goes wrong after you changed the settings, undo your changes, or re-install VirtServer.

virt-server.yml

Comments

# H2 Database configurations
database:
  # the name of your JDBC driver
  ...
  ...
  ...


VirtServer stores virtual service data in a database. It uses the settings to work with this database.
Note: Do not change these settings. They are for internal use by VirtServer.

# TimeZone
server:
  requestLog:
    timeZone: Europe/Stockholm


Specifies the time zone for the log.

# Logging settings.
logging:

  # The default level of all loggers.
  # Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
  level: INFO
  
  loggers:
    "com.smartbear": INFO
    "com.hubspot.dropwizard.guice.AutoConfig": WARN

  appenders:
    - type: console
      timeZone: Europe/Stockholm

server:


Various logging settings: default logging level, individual logger classes and their logging level, and so on.
Note: Change these settings only by requests from the SmartBear Support Team.

  applicationConnectors:

VirtServer connection settings.

  # For security reasons, we only allow the communication over https
  - type: https



The protocol (https only).

    port: 9090

The port number.
Note: If you change the port, ServiceV will not be able to find your VirtServer automatically. You will have to specify connection settings manually.

    keyStorePath: .virtserverkeystore

The file name of the Java keystore that contains the VirtServer certificate.
Note:This keystore is used only to secure traffic to and from the VirtServer web interface. To specify a keystore for virtual services, use the virtSSL settings described below.

    keyStorePassword: '!serverSecret!'

The password for accessing the keystore.

    validateCerts: false

adminConnectors:
  - type: https
    port: 9091
    keyStorePath: .virtserverkeystore
    keyStorePassword: '!serverSecret!'
    validateCerts: false

For internal use by VirtServer.
Note: Do not change these settings.

# Logging settings for virtual services.
virtLogging:

Logging settings for individual virtual APIs.

  # Enables har logging for virtual services.
  # Logs are saved in user_home/.readyapi/logs/virts dir

  Logs are saved as individual files
  in the specified folder.

  enableHarLog: false

  Enable logging.

  usePrettyPrint: false

  Use pretty print for log files.

# VirtServer configuration
virtServer:


VirtServer properties and HTTPS settings.

  # The context path. We need this instead of applicationContextPath
  # so we can process variables (such as version) in the String

  contextPath: /api/${API_VERSION}

Note: contextPath is used internally. Do not change.

  # The maximum number of the activity logs to keep
  maxActivityLog: 20

The maximum number of records in the activity log for VirtServer.
This log stores information on deploying and downloading virtual services, starting and stopping them, and so on.

  # The maximum number of the transaction logs to keep.
  # Storing many transaction logs may consume a lot of memory.
  # Keep this as low as possible.
  maxTransactionLog: 20

The maximum number of records in the transaction log for a virtual API.
This log stores information on individual requests. Storing too many records may consume lots of memory. Set reasonable values.

  # SSL configuration for virtual services
#virtSSL:

SSL certificate settings for virtual services. Uncomment, if needed.

    #virtKeystorePath: /path/.keystore

The keystore file name.

    #virtKeystorePassword: keystoreSecret

The keystore password.

    #virtKeyPassword: keySecret

A security key password.

    #virtTrustStorePath: /path/.keystore

The CA certificate file that is used to establish trust.

    #virtTrustStorePassword: trustStoreSecret

The password of the trust certificate.

  # Security settings
#securityConfig:

Security settings of VirtServer. Uncomment, if needed.

Note: In case these settings are absent, add them manually.

    #sessionTimeLimitEnabled: false

Enable a timeout for user sessions in the VirtServer web interface.
The next two parameters specify the time after which a user will be logged out.

    #idleTimeout: 60

Time (in minutes) after which an idle user will be logged out of the VirtServer web interface.

    #sessionTimeoutLimit: 480

Time (in minutes) after which a user will be logged out of the VirtServer web interface regardless of their activity.

    #passwordComplexityMode: false

Enable the password complexity mode.
If this option is enabled, the password must be at least 6 characters long and must contain at least one number and at least one capital letter.
Note: When you log in after the setting has been turned on, your password might fail to satisfy complexity criteria. In this case, you will have to change the password either by logging in to the web interface or by using the command line.

    #lockoutTimeout: 10

Specifies in minutes how long a user will be locked out when the user enters a wrong password for five times.
To disable the option, set it to 0 or comment it out.

    #oldVersionsCompatibility: true

Set the option to false to prohibit connections to VirtServer by using ServiceV 2.8 or older.
Default value: true.

See Also

Reference

Highlight search results