Difference between revisions of "Tomcat"

From Blue-IT.org Wiki

(Log4j)
(Add administrative user)
Line 13: Line 13:
 
  #> vim /etc/tomcat6/tomcat-users.xml
 
  #> vim /etc/tomcat6/tomcat-users.xml
 
  [...]
 
  [...]
 +
 +
<role rolename="manager-gui"/>
 +
<role rolename="manager-script"/>
 
  <role rolename="manager"/>
 
  <role rolename="manager"/>
 +
<role rolename="admin-gui"/>
 +
<role rolename="admin-script"/>
 
  <role rolename="admin"/>
 
  <role rolename="admin"/>
  <user username="tomcat" password="123-qwe" roles="manager,admin"/>
+
  <user username="tomcat" password="123-qwe" roles="manager-gui,admin-gui,manager,admin,manager-script,admin-script"/>
 
+
 
  </tomcat-users>
 
  </tomcat-users>
 
  [...]
 
  [...]

Revision as of 14:22, 29 August 2011

Tomcat6 / Ubuntu 10.04 LTS

Alter listening port

#> vim /etc/tomcat/server.xml
[...]
   <Connector port="8088" protocol="HTTP/1.1" 
              connectionTimeout="20000" 
              URIEncoding="UTF-8"
              redirectPort="8443" />
[...]

Add administrative user

#> vim /etc/tomcat6/tomcat-users.xml
[...]
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="admin"/>
<user username="tomcat" password="123-qwe" roles="manager-gui,admin-gui,manager,admin,manager-script,admin-script"/>

</tomcat-users>
[...]

Administration interface

When running on prot 8088 (! standard is 8080) e.g.:

http://localhost:8088/manager/html

Log4j

  1. Put log4j-xx.jar to /var/lib/tomcat6/common/classes
  2. Put log4j.properties in /var/lib/tomcat6/common/lib

See Grails