Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable accessing Tomcat manager #251

Open
RodBruce opened this issue Jan 13, 2023 · 0 comments
Open

Enable accessing Tomcat manager #251

RodBruce opened this issue Jan 13, 2023 · 0 comments

Comments

@RodBruce
Copy link

I want to access the Tomcat manage webapp. When I click on the manager webapp link in the default Tomcat "It works!" page I get a 403 'Forbidden' error. I followed the documentation to set up access but I still would get the 403 error.

I finally figured out that the SynValve configuration in the file:
/etc/tomcat9/context.xml
prevents access to the Tomcat manager webapp.

I figured out that I could add a Valve to the manager context in the file:
/etc/tomcat9/Catalina/localhost/manager.xml
That would override the SynValve.

Here is what I wound up adding:

`

    <Valve className="org.apache.catalina.valves.RemoteAddrValve"
        allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|10\.\d+\.\d+\.\d+" />
    <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>

`

Could we add a file that allows only access from localhost (similar to what Tomcat does by default) and then include in the documentation that this is where you go to configure access?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant