I am having trouble getting to the tomcat manager at http://localhost:8080/manager/html in tomcat 10.1.25. I have tried with local web browsers and curl. I have a tomcat user created and it has ownership of everything in my tomcat directory. My end goal is to access remotely but would settle for locally. I am running RHEL 9. I can access http://localhost:8080 both locally and remotely, but all of the internal links (/docs/*) from that page give a 403 error:
"You are not authorized to view this page.
By default the Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you'll need to edit the Manager's context.xml file."
Or error 401:
You are not authorized to view this page. If you have not changed
any configuration files, please examine the file
conf/tomcat-users.xml in your installation. That
file must contain the credentials to let you use this webapp.
My tomcat-users.xml:
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<user username="fakeuser" password="fakepass" roles="manager-gui"/>
<tomcat-users/>
My webapps/manager/META-INF/context.xml:
<Context antiResourceLocking="false" privileged="true" >
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
sameSiteCookies="strict" />
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1" />
<Manager sessionAttributeValueClassNameFilter="java.lang.(?:Boolean|Integer|Long|Number|String)|org.apache.catalina.filters.CsrfPreventionFilter$LruCache(?:$1)?|java.util.(?:Linked)?HashMap"/>
</Context>
- Commenting out <Valve className…
- Changing allow=”127.d+.d+.d+|::1|0:0:0:0:0:0:0:1″ to “127.d+.d+.d+|::1|my ip here”, “my ip here”, “*”, and “.*”.
- Adding the role admin-gui to the tomcat-users.xml.
- Editing webapps/host-manager/META-INF/context.xml with the same as manager/META-INF/context.xml.
- making sure to restart tomcat and check the status with each change.
- using https.
- using http://localIpHere:8080/manager/html.
I have followed every article I can find on here with no success.