简体   繁体   English

如何访问以下管理员和管理员角色 = 管理员脚本、tomcat、Apache Tomcat 9.0.43 上的管理员脚本

[英]how to access following admin and manager roles= manager-script, tomcat, admin-script on Apache Tomcat 9.0.43

I install appache and then Tomcat 9.0.43 on my Raspberry Pi3 both servers and their atributes are working fine but when it come to login I am having issues with following manager and admin roles:我在我的 Raspberry Pi3 上安装 appache,然后安装 Tomcat 9.0.43,两台服务器及其属性都运行良好,但是在登录时,我遇到了以下经理和管理员角色的问题:

(1)manager-script, when I lounch localhost:8080 I get three buttons on right handside 1.Server Status,2.Manager App and 3.Host manager this rolename does not let me login either of them (1)manager-script,当我启动 localhost:8080 时,我在右侧得到三个按钮 1.Server Status、2.Manager App 和 3.Host manager 这个角色名不允许我登录其中任何一个

(2) rolename=admin-script like manager-script can't login in either of the button (2)rolename=admin-script like manager-script 不能登录任何一个按钮

(3) once you login to either other define roles in following code then described above, once you login you will staylogin no matter how many times you close your browser some time it works restarting the server or have to completly reboot the whole system (3)一旦您登录到上面描述的以下代码中的任何其他定义角色,一旦您登录,无论您关闭浏览器多少次,您都将保持登录状态,有时它可以重新启动服务器或必须完全重新启动整个系统

(4) rolename=tomcat, I can't work out what does it suppose to do I include this rolename in my code because every code I have seen on net everyone is keeping this role in their code so I have include in mine to but it doesn't let me login to either (4) rolename=tomcat,我不知道该怎么做它也不让我登录

Code代码

FAIL - Unknown command [/text]失败 - 未知命令 [/text]

Restart the server every time if I have to either login in a different role or even server stop it self then I have to issue following command again or re-start the Rspberry pi 3如果我必须以不同的角色登录甚至服务器自行停止,则每次都重新启动服务器,然后我必须再次发出以下命令或重新启动 Rspberry pi 3

terminal comand to restart the Tomcat Server终端命令重启 Tomcat 服务器

for example if I have tested Server Status now I wanted to get into Managers app I have to close the browser and restart the server again is it normal of there is something wrong with my machine?例如,如果我现在测试了服务器状态,我想进入 Managers 应用程序,我必须关闭浏览器并重新启动服务器,这是否正常,我的机器有问题? enter image description here在此处输入图像描述

Tomcat itself does not define any roles, these are all defined by the web applications. Tomcat 本身没有定义任何角色,这些都是由 web 应用程序定义的。 In order to use the HTML versions of Tomcat Manager and Tomcat Host Manager application you need:为了使用 Tomcat 管理器和 Tomcat 主机管理器应用程序的 HTML 版本,您需要:

The roles you cite ( manager-script and admin-script ) are used by the text interface of those applications.您引用的角色( manager-scriptadmin-script )由这些应用程序的文本界面使用。

Due to the way HTTP Authentication is implemented in browsers, changing users is difficult: the easiest solution to your problem is not to change users at all.由于 HTTP 身份验证在浏览器中实现的方式,更改用户很困难:解决问题的最简单方法是根本不更改用户。 If you want to use the two aforementioned applications, define a user which has both roles:如果要使用上述两个应用程序,请定义一个具有两个角色的用户:

<user username="user" password="secret" roles="admin-gui,manager-gui" />

and log in using that user.并使用该用户登录。

Otherwise you'll bump into two problems:否则你会遇到两个问题:

  • user credentials are cached in the HTTP session (unless you set cache="false" on the Basic Authenticator Valve ).用户凭据缓存在 HTTP session 中(除非您在Basic Authenticator Valve上设置cache="false" )。 Sessions are stored to disk upon server restart, so the only way to logout from a user is to delete the JSESSIONID cookie in your browser,会话在服务器重新启动时存储到磁盘,因此从用户注销的唯一方法是删除浏览器中的JSESSIONID cookie,
  • browsers cache previously entered HTTP Authentication credentials, so that the next time they are needed you won't get a popup window to enter credentials.浏览器缓存之前输入的 HTTP 身份验证凭据,这样下次需要它们时,您就不会弹出 window 来输入凭据。 The only way to login as another user (assuming you already cleared the cookies) is to add the credentials into the URL, eg http://user:password@localhost:8080/manager/html .以其他用户身份登录的唯一方法(假设您已经清除了 cookie)是将凭据添加到 URL 中,例如http://user:password@localhost:8080/manager/html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM