On 21/07/2016 18:07, Nick Klose wrote:
> Hi Mark,
> 
> I only need access from one remote machine, but I couldn't get a valve
> working properly for the IP I'm connecting from so I decided to open access
> from anywhere until I get the Manager App working.
> 
> The file's at at /opt/tomcat8-dev/conf/context.xml. I've not made any
> changes to server.xml.

That is the default context.xml that applies to every web application.
You should be editing the Manager context.xml file that will be in
webapps/manager/META-INF/context.xml

Don't forget to restore conf/content.xml to its original form.

Mark

> 
> I tried modifying context.xml to look like this, but nothing seems to have
> changed:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Context>
>     ​
> <WatchedResource>WEB-INF/web.xml</WatchedResource>
> ​
> ​    ​
> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
>     <Manager pathname="" />
> </Context>
> 
> Thanks,
> Nick Klose
> 
> On Thu, Jul 21, 2016 at 12:20 AM, Mark Thomas <ma...@apache.org> wrote:
> 
>> On 20/07/2016 23:11, Nick Klose wrote:
>>> Hello,
>>>
>>> I have recently set up Tomcat 8.5.4 on Ubuntu 14.04. I have the default
>>> page showing on port 8080, but when I click on the Manager App button I
>>> immediately get "403 Access Denied" and am not prompted to enter a
>> username
>>> or password. I have set up roles and a user in conf/tomcat-users.xml in
>> my
>>> Tomcat install directory (which I have named /opt/tomcat8-dev). Here's
>> what
>>> that file looks like:
>>>
>>> <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="admin"/>
>>>     <role rolename="admin-gui"/>
>>>     <role rolename="manager"/>
>>>     <role rolename="manager-gui"/>
>>>
>>>     <user username="admin" password="[redacted]"
>>> roles="admin,admin-gui,manager,manager-gui"/>
>>> </tomcat-users>
>>>
>>> The server I'm running it on is a remote VM without a window manager,
>>> however I installed elinks (a command-line web browser) and tested the
>>> Manager App and it worked fine there; I was asked for credentials, and
>> was
>>> able to view the app using the username/password I specified. However,
>> this
>>> is obviously not an ideal solution.
>>>
>>> I have tried modifying context.xml as specified in the documentation. I
>>> have enabled privileged mode and added a valve allowing any IP to connect
>>> (specified using a regex). Here's what my context.xml file looks like
>>> currently:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <Context privileged="true"  antiResourceLocking="false"
>>> docBase="${catalina.home}/webapps/manager">
>>> ​    ​
>>> <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>> allow="^.*$"
>>> />
>>>     ​
>>> <WatchedResource>WEB-INF/web.xml</WatchedResource>
>>> ​
>>> ​    ​
>>> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
>>>     <Manager pathname="" />
>>> </Context>
>>>
>>> Any suggestions for how I can fix this issue?
>>
>> If you want to allow access from everywhere (not recommended) just
>> remove / comment out the Valve.
>>
>> Where is the context.xml file located?
>>
>> Unless you have changed the default settings in server.xml for the
>> default Host, you should not need to specify a docBase in context.xml.
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to