Setup Apache Tomcat on Synology
- you need to ssh to the synology using root account with your default GUI password.
- go to directory
/var/packages/Tomcat/target/apache-tomcat-6.0.36/conf/
- edit the file
Tomcat-users.xml
- stop and restart Tomcat server
- now can login with your new account
This is an example of the code of the file tomcat-users.xml
:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="user" password="password" roles="admin,admin-gui,manager,manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>
It is in the path /var/packages/Tomcat7/target/src/conf
.
If there is any problem with the XML, you can check the log file: /var/packages/Tomcat7/target/src/logs/catalina.out
-
Through Terminal/SSH session, open the /var/packages/Tomcat7/target/src/conf/tomcat-users.xml file.
-
Ensure atleast below is available in that:
<role rolename="manager-gui"/> <user username="tomcat" password="s3cret" roles="manager-gui"/>
-
Under Package Center in the Diskstation, restart Tomcat service (Stop and Start).
Now you should be able to login with username 'tomcat' password 's3cret'.
Reference: https://community.synology.com/enu/forum/1/post/128739