Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 50793 invoked from network); 27 Oct 2008 13:56:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Oct 2008 13:56:32 -0000 Received: (qmail 62157 invoked by uid 500); 27 Oct 2008 13:56:24 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 61960 invoked by uid 500); 27 Oct 2008 13:56:23 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 61949 invoked by uid 99); 27 Oct 2008 13:56:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2008 06:56:23 -0700 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michele.mase@gmail.com designates 74.125.78.149 as permitted sender) Received: from [74.125.78.149] (HELO ey-out-1920.google.com) (74.125.78.149) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2008 13:55:10 +0000 Received: by ey-out-1920.google.com with SMTP id 4so766745eyg.48 for ; Mon, 27 Oct 2008 06:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=U+GCApQytJWjwK6kLAuxlBYY0RmjeOkZ7LzPCZO3+qY=; b=eIm+TmsHQ/V3homa85A0feiCphzPPm42DvRFLOf2OQRl5e/AjofP8OOQPXgJ65iCOa foNHPtPi1rI8psalOb6Mtf12qKQWHo3BczNTuj63uGa3jZPwttt+rgDtz/UL3ORQR8uT +7GyXdJ1K4ISBqfePjcB65iIdkuh+batupx/4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=vrRuO0HYnKXmkTAE/9CSrisV2PycnM215K1Q0LZ+59IGze7QbC1ZJ0JZksWrmc2g32 wHvSs7j3g+wDmOQ3dH9pJANpyj6yYv7LL7M9kTDCEpcQvKGm4q1AhDlXbTQ4qYA/Kvvq ONfnlPNrx9Ts45Na6qp7rHXrKs9LNq7KvlIQ0= Received: by 10.210.46.4 with SMTP id t4mr6684069ebt.166.1225115737011; Mon, 27 Oct 2008 06:55:37 -0700 (PDT) Received: by 10.210.130.17 with HTTP; Mon, 27 Oct 2008 06:55:36 -0700 (PDT) Message-ID: Date: Mon, 27 Oct 2008 14:55:36 +0100 From: "Michele Mase'" To: users@httpd.apache.org In-Reply-To: <4905B84F.7020502@ice-sa.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36631_9527314.1225115737008" References: <4905A2FC.90405@ice-sa.com> <4905B84F.7020502@ice-sa.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] proxy_ajp webdav http 1.1 authentication ------=_Part_36631_9527314.1225115737008 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline As you suggested, The file (I have omitted it before) is ok (tomcat baseed basic auth) The question/matter/problem was: The app1 and the webdav app works only if: httpd.conf ... ok ProxyPass /app1/ ajp://www.example.com:8009/app1/ ProxyPass / http://www.example.com:8080/ ProxyPassReverse / http://www.example.com:8080/ ... or ok (tested only few minutes ago) ProxyPass / ajp://www.example.com:8009/ None of the following works (why??) ko ProxyPass /app1/ ajp://www.example.com:8009/app1/ ProxyPass /webdav/ ajp://www.example.com:8009/webdav/ ko ProxyPass /app1/ http://www.example.com:8080/app1/ ProxyPassReverse /app1/ http://www.example.com:8080/app1/ ProxyPass /webdav/ http://www.example.com:8080/webdav/ ProxyPassReverse /webdav/ http://www.example.com:8080/webdav/ ko ProxyPass / http://www.example.com:8080/ ProxyPassReverse / http://www.example.com:8080/ My solution was: "using the simplest case" ProxyPass / ajp://www.example.com:8009/ And both /app1 and /webdav work! Michele On Mon, Oct 27, 2008 at 1:47 PM, Andr=E9 Warnier wrote: > Hi. > > Ah ! your Dav is at the Tomcat level, not the Apache level. > And that's also where the Dav authentication is being done. > > In other words, no authentication and no Dav is being handled at the Apac= he > level, so it has nothing to do with the Apache proxying, which probably > works fine. > > I believe this question should be reposted to the Tomcat mailing list, at= " > users@tomcat.apache.org". > > In the meantime, my guess is that you have not created the appropriate us= er > and role for the authentication under Tomcat. > Just as a tip : > In your Tomcat/conf directory, there should be a file "tomcat-users.xml". > That's where users and roles are defined. > According to your in the Dav webapp setup below, > you should have something like this in tomcat-users.xml : > > > > (add it if it's not there) > > and then use the user "davuser" and the password you chose for logging in > when you DAV pops up its authentication dialog. > > If that does not work, then ask further on the Tomcat list. > > > > > > Michele Mase' wrote: > >> here is the conf: >> >> Frontend server: >> >> ServerName www.example.com >> ProxyPass /favicon.ico ! >> ProxyPass /robots.txt ! >> ProxyPass /images/ ! >> ProxyPass /balancer ! >> ProxyPass /status ! >> ProxyPass /manager ! >> ProxyPass /host-manager ! >> ProxyPass /docs ! >> ProxyPass /examples ! >> ProxyPass /app1/ ajp://www.example.com:8009/app1/ >> ProxyPass / http://www.example.com:8080/ >> ProxyPassReverse / http://www.example.com:8080/ >> >> >> Tomcat: >> server.xml (default config): >> ... >> > connectionTimeout=3D"20000" >> redirectPort=3D"8443"/> >> ... >> >> >> $CATALINA_HOME/conf/Catalina/localhost/app1.xml >> >> >> > allowLinking=3D"true" caseSensitive=3D"false" /> >> >> >> WEB-INF/web.xml of app1 (where the webdav authentication is) >> >> >> > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >> version=3D"2.4"> >> Webdav Content Management >> >> Webdav Content Management >> >> >> webdav >> >> org.apache.catalina.servlets.WebdavServlet >> >> debug >> 0 >> >> >> listings >> true >> >> >> readonly >> false >> >> >> >> webdav >> /* >> >> >> >> The Entire Web Application >> /* >> >> >> admin >> >> >> >> BASIC >> Tomcat Supported Realm >> >> >> >> An example role defined in "conf/tomcat-users.xml" >> >> admin >> >> >> >> >> >> >> >> On Mon, Oct 27, 2008 at 12:16 PM, Andr=E9 Warnier wrote: >> >> Michele Mase' wrote: >>> >>> I've the following problem: >>>> >>>> A ftontend server with apache2.2.x (http1.1) >>>> mod_proxy >>>> mod_proxy_ajp >>>> >>>> A backend server: >>>> tomcat 6.x with 2 webapps: >>>> /app1 >>>> /app2 (webdav, basic authentication via http) >>>> >>>> Problem: >>>> >>>> /app1 works well under proxy_ajp: >>>> ProxyPass /some_path ajp://server:8009/app1 >>>> >>>> webdav authentication cannot work under proxy_ajp >>>> It works only under proxy_http: >>>> ProxyPass /path http://server/app2 >>>> ProxyPassReverse /path http://server/app2 >>>> >>>> Are there some limitations in proxy_ajp module? >>>> Could webdav authentication work with proxy_ajp? >>>> Michele >>>> >>>> What do you call "webdav authentiation" ? >>>> >>> DAV itself does not handle authentication. >>> It is whatever you put "around it" in your configuration that will do t= he >>> authentication. >>> Can you post the configuration of the section which you configure with >>> "Dav >>> on" ? >>> >>> >>> --------------------------------------------------------------------- >>> The official User-To-User support forum of the Apache HTTP Server >>> Project. >>> See for more info. >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >>> " from the digest: users-digest-unsubscribe@httpd.apache.org >>> For additional commands, e-mail: users-help@httpd.apache.org >>> >>> >>> >> > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project= . > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > ------=_Part_36631_9527314.1225115737008 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline As you suggested, The file (I have omitted it before) is ok (tomcat baseed = basic auth)

<?xml version=3D'1.0' encoding=3D'utf-8&#= 39;?>
<tomcat-users>
  <role rolename=3D"manage= r"/>
  <role rolename=3D"status"/>
  <role rolen= ame=3D"admin"/>
  <user username=3D"tomcat&quo= t; password=3D"blablabla" roles=3D"admin,manager,status"= ;/>
</tomcat-users>

The question/matter/problem was:
The app1 and the webdav app works o= nly if:
httpd.conf 
...
ok  
ProxyPass /app1/ ajp:= //www.example.com:8009/app1/<= /a>
ProxyPass /
http://www.exam= ple.com:8080/
ProxyPassReverse / http://www.exam= ple.com:8080/
...
or
ok (tested only few minutes ago)
Proxy= Pass / ajp://www.example.com:8009/=

None of the following works (why??)
ko
ProxyPass /app1/ ajp://www.example.com:8009/app1/ProxyPass /webdav/ ajp://= www.example.com:8009/webdav/

ko
ProxyPass /app1/ http://www.e= xample.com:8080/app1/
ProxyPassReverse /app1/ http://www.example.com:8080/app1/
ProxyPass /webdav/ http://w= ww.example.com:8080/webdav/
ProxyPassReverse /webdav/ http://www.example.com:8080/webdav/
ko
ProxyPass / http://www.e= xample.com:8080/
ProxyPassReverse / http://www.exam= ple.com:8080/

My solution was: "using the simplest case&quo= t;
ProxyPass / ajp://www.exampl= e.com:8009/

And both /app1 and /webdav work!

Michele

On Mon, Oct 27, 2008 at 1:47 PM, Andr=E9 Warnier <aw@ice-sa.com> wrote:=
Hi.

Ah ! your Dav is at the Tomcat level, not the Apache level.
And that's also where the Dav authentication is being done.

In other words, no authentication and no Dav is being handled at the Apache= level, so it has nothing to do with the Apache proxying, which probably wo= rks fine.

I believe this question should be reposted to the Tomcat mailing list, at &= quot;users@tom= cat.apache.org".

In the meantime, my guess is that you have not created the appropriate user= and role for the authentication under Tomcat.
Just as a tip :
In your Tomcat/conf directory, there should be a file "tomcat-users.xm= l".  That's where users and roles are defined.
According to your <security-constraint> in the Dav webapp setup below= ,
you should have something like this in tomcat-users.xml :

<role rolename=3D"admin"/>
<user username=3D"davuser" password=3D"xxxxx" roles= =3D"admin"/>
(add it if it's not there)

and then use the user "davuser" and the password you chose for lo= gging in when you DAV pops up its authentication dialog.

If that does not work, then ask further on the Tomcat list.
=





Michele Mase' wrote:
here is the conf:

Frontend server:
<VirtualHost *:80>
       ServerName www.example.com
       ProxyPass /favicon.ico !
       ProxyPass /robots.txt !
       ProxyPass /images/ !
       ProxyPass /balancer !
       ProxyPass /status !
       ProxyPass /manager !
       ProxyPass /host-manager !
       ProxyPass /docs !
       ProxyPass /examples !
       ProxyPass /app1/ ajp://www.example.com:8009/app1/
       ProxyPass / http://www.example.com:8080/
       ProxyPassReverse / http://www.example.com:8080/
</VirtualHost>

Tomcat:
server.xml (default config):
...
 <Connector port=3D"8080" protocol=3D"HTTP/1.1"=
              connectionTimeout=3D"= ;20000"
              redirectPort=3D"8443= "/>
...
<Connector port=3D"8009" protocol=3D"AJP/1.3" redire= ctPort=3D"8443" />

$CATALINA_HOME/conf/Catalina/localhost/app1.xml
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<Context path=3D"/app1" docBase=3D"/app1">
       <Resources className=3D"org.apache.nami= ng.resources.FileDirContext"
allowLinking=3D"true" caseSensitive=3D"false" />
</Context>

WEB-INF/web.xml of app1 (where the webdav authentication is)

<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?> <web-app xmlns=3D"http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance&= quot;
   xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version=3D"2.4">
 <display-name>Webdav Content Management</display-name>  <description>
    Webdav Content Management
 </description>
 <servlet>
   <servlet-name>webdav</servlet-name>

<servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet= -class>
   <init-param>
     <param-name>debug</param-name>
     <param-value>0</param-value>
   </init-param>
   <init-param>
     <param-name>listings</param-name>
     <param-value>true</param-value>
   </init-param>
   <init-param>
     <param-name>readonly</param-name>
     <param-value>false</param-value>
   </init-param>
 </servlet>
 <servlet-mapping>
   <servlet-name>webdav</servlet-name>
   <url-pattern>/*</url-pattern>
 </servlet-mapping>
 <security-constraint>
   <web-resource-collection>
     <web-resource-name>The Entire Web Application<= ;/web-resource-name>
     <url-pattern>/*</url-pattern>
   </web-resource-collection>
   <auth-constraint>
     <role-name>admin</role-name>
   </auth-constraint>
 </security-constraint>
 <login-config>
   <auth-method>BASIC</auth-method>
   <realm-name>Tomcat Supported Realm</realm-name>  </login-config>
 <security-role>
   <description>
     An example role defined in "conf/tomcat-users.xml= "
   </description>
   <role-name>admin</role-name>
 </security-role>
 <welcome-file-list>
   <welcome-file/>
 </welcome-file-list>
</web-app>


On Mon, Oct 27, 2008 at 12:16 PM, Andr=E9 Warnier <aw@ice-sa.com> wrote:

Michele Mase' wrote:

I've the following problem:

A ftontend server with apache2.2.x (http1.1)
mod_proxy
mod_proxy_ajp

A backend server:
tomcat 6.x with 2 webapps:
/app1
/app2 (webdav, basic authentication via http)

Problem:

/app1 works well under proxy_ajp:
ProxyPass /some_path ajp://server:8009/app1

webdav authentication cannot work under proxy_ajp
It works only under proxy_http:
ProxyPass /path http://ser= ver/app2
ProxyPassReverse /path htt= p://server/app2

Are there some limitations in proxy_ajp module?
Could webdav authentication work with proxy_ajp?
Michele

 What do you call "webdav authentiation" ?
DAV itself does not handle authentication.
It is whatever you put "around it" in your configuration that wil= l do the
authentication.
Can you post the configuration of the section which you configure with &quo= t;Dav
on" ?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.<= br> See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
 "   from the digest: users-digest-unsubscribe@httpd.apa= che.org
For additional commands, e-mail: users-help@httpd.apache.org





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.<= br> See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
 "   from the digest: users-digest-unsubscribe@httpd.ap= ache.org
For additional commands, e-mail: users-help@httpd.apache.org


------=_Part_36631_9527314.1225115737008--