Apache Tomcat Configuration: Access Not Authorized
I am using Apache Tomcat server. I installed successfully on my computer because the server in running but My problem is that I cannot open a page due wrong credential. Below is the message after I enter my credential as username: root
and password: tomcat
Access to Tomcat server has not been authorized. Set the correct username
and password with the "manager-script" role in the Tomcat customizer in the
Server Manager.
See the server log for details.
What do I have do to do solve this issue or what is wrong?
Answer
In Windows operating system, Call %CATALINA_HOME%
is directory what Apache Tomcat installed. (In Unix, macOS, $CATALINA_HOME
is the home directory of Apache Tomcat)
Looking for file %CATALINE_HOME%\conf\tomcat-users.xml
. Declare user and corresponding role follow instructor
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
This is an example, it just work
<role rolename="manager-gui"/>
<role rolename="manager-status"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<user username="admin" password="admin" roles="manager-gui,manager-status,manager-script,manager-jmx"/>
<user username="admin2" password="admin2" roles="manager-gui,manager-status"/>
<user username="admin3" password="<must-be-changed>" roles="manager-jmx"/>
You need restart Apache Tomcat for new configuration in affected.
Reference: https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access
Related Questions
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM