# Tomcat Arguments

This table lists the various configuration options available for the embedded Tomcat server that yCrash runs with. These options control server-level settings such as logging, compression, security, and session management.

Here is the complete list of options that you can pass with the yCrash server:

Options Description Default
--access-log Enables AccessLogValue to STDOUT false
--access-log-pattern If --access-log is enabled, sets the logging pattern common
--basic-auth-pw Password to be used with basic auth. Defaults to BASIC_AUTH_PW env variable.
--basic-auth-user Username to be used with basic auth. Defaults to BASIC_AUTH_USER env variable.
--bind-on-init Controls when the socket used by the connector is bound. By default it is bound when the connector is initiated and unbound when the connector is destroyed. true
--compressable-mime-types Comma delimited list of mime types that will be compressed when using GZIP compression. text/html, text/xml, text/plain, text/css, application/json, application/xml, text/javascript, application/javascript
--context-xml The path to the context xml to use.
--enable-basic-auth Secure the app with basic auth. Use with --basic-auth-user and --basic-auth-pw or --tomcat-users-location false
--enable-client-auth Specify -Djavax.net.ssl.keyStore and -Djavax.net.ssl.keyStorePassword in JAVA_OPTS false
--enable-compression Enable GZIP compression on responses false
--enable-naming Enables JNDI naming false
--enable-ssl Specify -Djavax.net.ssl.keyStore, -Djavax.net.ssl.keystoreStorePassword, -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStorePassword in JAVA_OPTS. Note: should not be used if a reverse proxy is terminating SSL for you false
--expand-war-file Expand the war file and set it as source true
--expanded-dir-name The name of the directory the WAR file will be expanded into. expanded
--help
--max-threads Set the maximum number of worker threads 0
--memcached-transcoder-factory-class The class name of the factory that creates the transcoder to use for serializing/deserializing sessions to/from memcached.
--path The context path empty_string
--port The port that the server will accept http requests on. 8080
--proxy-base-url Set proxy URL if tomcat is running behind reverse proxy empty_string
--scanBootstrapClassPath Set jar scanner scan bootstrap classpath. false
--session-store Session store to use (valid options are 'memcache' or 'redis')
--session-store-ignore-pattern Request pattern to not track sessions for. Valid only with memcache session store. (default is .*\.(png|gif|jpg|css|js)$. Has no effect for 'redis') .*\.(png|gif|jpg|css|js)$
--session-store-locking-mode Session locking mode for use with memcache session store. (default is all. Has no effect for 'redis') all
--session-store-operation-timeout Operation timeout for the memcache session store. (default is 5000ms) 5000
--session-store-pool-size Pool size of the session store connections (default is 10. Has no effect for 'memcache') 10
--session-store-ssl-endpoint-identification Enables or disables SSL endpoint identification for the redis session store. (default is true. Has no effect for 'memcache') true
--session-timeout The number of minutes of inactivity before a user's session is timed out.
--shutdown-override Overrides the default behavior and casues Tomcat to ignore lifecycle failure events rather than shutting down when they occur. false
--temp-directory Define the temp directory ./target/tomcat.PORT
--tomcat-users-location Location of the tomcat-users.xml file. (relative to the location of the webapp-runner jar file)
--uri-encoding Set the URI encoding to be used for the Connector.
--use-body-encoding-for-uri Set if the entity body encoding should be used for the URI. false
--secure-error-report-valve Set true to set ErrorReportValve properties showReport and showServerInfo to false. This protects from Apache stacktrace logging of malicious http requests. false
-A Allows setting HTTP connector attributes.
For example: -Acompression=on Syntax: -Akey=value

See the Tomcat documentation for a complete list of HTTP connector attributes (opens new window)
{}

# Using behind a reverse proxy server

If you are using webapp-runner behind a proxy server, you can set the proxy base url within tomcat:

$ java -jar webapp-runner.jar --proxy-base-url https://example.com target/<appname>.war
1

If you pass an HTTPS base url, e.g. https://example.com, secure flag will be automatically added to session cookies. This indicates to the browser that cookies should only be sent over a secure protocol.