Tomcat Installation
Installation Steps
See Configure Tomcat.
Activate headless mode
See Headless Mode Activation on Apache Tomcat.
Optional configuration
See Enable HTTP Compression (gzip).
Policy configuration
See Java Security Manager in Tomcat.
HTTP reverse proxy
For a variety of reasons, it is not ideal to allow users to connect directly to tomcat. So it's generally recommended to put an HTTP reverse proxy such as Apache HTTP Server or Nginx in front of it.
Using Apache HTTP Server
See Apache Server Key Configurations and the tutorials:
- Configure Apache HTTP Server as a Proxy on a Linux OS.
- Configure Apache HTTP Server as a Proxy on a Windows OS.
Using Nginx
See NginX Server Key Configurations and the tutorial to Set up NginX Proxy Server.
Http (unsecure)
See Set up NginX Proxy Server.
Https (secure)
See More Configurations for the NginX HTTP Proxy Server.
See Configure Tomcat to Find Proxy Headers.
Proxying and tunnels
See Reverse Proxy and SSH Tunneling.
Recommendations
Default encoding
See Configure Tomcat.
Troubleshooting
Out Of Memory Error
General Memory Settings
See Configure Java Memory for Tomcat.
Max number of threads
See "Unable to Create Native Thread" Errors on Debian Systems.
Java Security Manager
See Java Security Manager in Tomcat
Allowing "/" and "\" in page names
See Configure Tomcat to Allow Slash and Backslash in Page Names.
Apache front-end server
Note that if you're using the Apache web server as a front-end, you also need to configure Apache to allow encoded / and \ (AllowEncodedSlashes NoDecode) and also make sure to use nocanon on the ProxyPass line used.
NotSerializableException
See Session Deserialization Errors in Tomcat.
SEVERE: Error listenerStart
See "Severe: Error listenerStart" in Logs.
Parameter count exceeded allowed maximum
See Parameter Count Exceeded Allowed Maximum.
ThreadLocal Errors
See ThreadLocal Memory Leak Warnings on Shutdown.
Request header is too large
See Request Header is Too Large.
Old Instructions
Note that Tomat 7 is no longer supported.
- XWiki 12.0+ requires a Tomcat version >= 8 since it requires Servlet 3.1+
- Older versions of XWiki require a Tomcat version >= 7 since it requires Servlet 3.0+
- Tomcat 7 is not using URF-8 by default. Edit the conf/server.xml file to set the UTF-8 encoding:
<Connector port="8080" ... URIEncoding="UTF-8"> </Connector>