swfchang
March 28th, 2009, 01:42 AM
I´ve just installed my Ubuntu 8.10 server with LAMP server and Tomcat. I was able to see the page http://localhost:8080 and when I tried to access http://localhost:8080/manager/html, it asked me for username and password which I have no clue what they were.
After searching on the forum, I followed the instructions to change /etc/tomcat6/tomcat-users.xml to add the roles and user as follows (I did not change the commented lines in original file:
<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename=¨tomcat¨/>
<role rolename=¨manager"/>
<role rolename=¨admin¨/>
<user username=¨tomcat¨ password=mypassword roles=¨tomcat,admin,manager¨/>
</tomcat-users>
I restarted tomcat using command sudo service tomcat6 restart
But when I tried to access http://localhost:8080/manager/html again, it timed out. After I commented out the lines I´ve added for the roles and users in the tomcat-users.xml file, I can access http://localhost:8080/manager/html again but it asked me for username and password again.
Not sure what else I needed to do to get it working. Appreciate if anyone out there could help.
Thanks a lot!
After searching on the forum, I followed the instructions to change /etc/tomcat6/tomcat-users.xml to add the roles and user as follows (I did not change the commented lines in original file:
<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename=¨tomcat¨/>
<role rolename=¨manager"/>
<role rolename=¨admin¨/>
<user username=¨tomcat¨ password=mypassword roles=¨tomcat,admin,manager¨/>
</tomcat-users>
I restarted tomcat using command sudo service tomcat6 restart
But when I tried to access http://localhost:8080/manager/html again, it timed out. After I commented out the lines I´ve added for the roles and users in the tomcat-users.xml file, I can access http://localhost:8080/manager/html again but it asked me for username and password again.
Not sure what else I needed to do to get it working. Appreciate if anyone out there could help.
Thanks a lot!