Re: [Dspace-tech] Logged in user not consistent when using apache with tomcat

2009-10-30 Thread Mr Havercamp
Hi John

Ran into exactly the same problem not long ago. The problem stems from 
the Reverse proxy (i.e. there are issues with authenticated sessions and 
reverse proxying from Apache).

To resolve;

Apache config;

Keep your proxypass but remove proxypassreverse

Tomcat config (Handle reverse proxying from Tomcat);

- Open web.xml,
- Find the Connector xml tag, it will look something like;

Connector port=8180 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 .../

- Add (or uncomment) your proxy info in the Connector tag so it reads 
something like;

Connector port=8180 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true 
proxyPort=80 proxyName=xxx/

Where xxx is your public domain.

Reload tomcat and apache and it will (hopefully) solve your problem.

Cheers


Hayden

John Preston wrote:
 OK, I have narrowed it down to the redirection using ajp:

 ProxyPass /ui ajp://localhost:8009/ui
 ProxyPassReverse /ui ajp://localhost:8009/ui

 If I use http:xxx then I don't see this problem. Does anyone know why 
 this is so.

 John

 On Wed, Oct 28, 2009 at 2:35 PM, John Preston byhisde...@gmail.com 
 mailto:byhisde...@gmail.com wrote:

 I am running DSpace 1.5.2 inside tomcat 2.6.20 along with apache
 2.x for redirection. My apache config file are:

 VirtualHost *:80
   RewriteEngine on

 # Redirect / to /ui
   RewriteCond %{REQUEST_URI} ^/
   RewriteRule ^/$ /ui/ [R]

 # Disable apache caching for all repository content, this will be
 handled by tomcat
 CacheDisable /ui

 /VirtualHost
 (I use ui instead of xmlui)

 and

 ProxyPass /ui ajp://localhost:8009/ui
 ProxyPassReverse /ui ajp://localhost:8009/ui

 Everything seems to work fine however I have an intermittent
 problem. If I login as one user, and navigate to some pages, log
 out and login as another user, then when navigating through
 various pages I see where the current eperson changes from the
 currently logged in user to the previously logged in user. If
 however I connect to the site directly via http://xxx:8080/ui then
 I don't have this problem.

 I am using firefox 3.5 and ie 7 and the results are the same. Can
 anyone who uses the apache infront of tomcat say whether I an
 doing  something wrong.

 John


 

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 

 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
   


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Logged in user not consistent when using apache with tomcat

2009-10-28 Thread John Preston
OK, I have narrowed it down to the redirection using ajp:

ProxyPass /ui ajp://localhost:8009/ui
ProxyPassReverse /ui ajp://localhost:8009/ui

If I use http:xxx then I don't see this problem. Does anyone know why this
is so.

John

On Wed, Oct 28, 2009 at 2:35 PM, John Preston byhisde...@gmail.com wrote:

 I am running DSpace 1.5.2 inside tomcat 2.6.20 along with apache 2.x for
 redirection. My apache config file are:

 VirtualHost *:80
   RewriteEngine on

 # Redirect / to /ui
   RewriteCond %{REQUEST_URI} ^/
   RewriteRule ^/$ /ui/ [R]

 # Disable apache caching for all repository content, this will be handled
 by tomcat
 CacheDisable /ui

 /VirtualHost
 (I use ui instead of xmlui)

 and

 ProxyPass /ui ajp://localhost:8009/ui
 ProxyPassReverse /ui ajp://localhost:8009/ui

 Everything seems to work fine however I have an intermittent problem. If I
 login as one user, and navigate to some pages, log out and login as another
 user, then when navigating through various pages I see where the current
 eperson changes from the currently logged in user to the previously logged
 in user. If however I connect to the site directly via http://xxx:8080/uithen 
 I don't have this problem.

 I am using firefox 3.5 and ie 7 and the results are the same. Can anyone
 who uses the apache infront of tomcat say whether I an doing  something
 wrong.

 John


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech