How to set up Tomcat 7 on Synology

R B picture R B · Sep 7, 2014 · Viewed 23.2k times · Source

I installed Tomcat 7 on Synology DS414. I cannot find any info on how to set it up and get it running. The NAS comes with a Web server app, and that is the one serving up its index.html file. I cannot find any config file for Tomcat, nor can I find any way to enable it, so that it becomes the active web server on the device. Does it replace the Web Station web server that comes with the NAS, or is it an add-on that works with it?

Answer

Patrick Smits picture Patrick Smits · Jan 6, 2015

Alvaro is correct.

The correct file is /volume1/@appstore/Tomcat7/src/conf/tomcat-users.xml, edit it using putty or winscp.

Example contents:

<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="manager-gui,manager-script,manager-jmx,manager-status,manager,admin,admin-gui"/>

Stop and start the Tomcat package after making changes to the configuration file to make sure Tomcat reloads it.