mod_proxy error "Your session is expired. Please relogin."

1,170 views
Skip to first unread message

d_d_d

unread,
Aug 23, 2011, 5:58:02 AM8/23/11
to scmmanager
Here is my system.


OSX lion Server 10.7.1

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511c)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)

Tomcat 7.0.20

Apache/2.2.19 (Unix)
mod_ssl/2.2.19
OpenSSL/0.9.8r
DAV/2
PHP/5.3.6 with Suhosin-Patch
mod_jk/1.2.30

httpd.conf
<VirtualHost *:80>
ServerName scm.mydomain.com

ProxyRequests Off
ProxyPass / http://localhost:8080/scm/
ProxyPassReverse / http://localhost:8080/scm/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>

SCM-Manager 1.6


Localhost access that is "http://localhost:8080/scm" works just fine.

"scm.mydomain.com" access look like fine but when I login my server
successfully, immediately I've got error "Your session is expired.
Please relogin." and I have to login again and again.

What should I do? Or can I use mod_jk whit tomcat? (and sorry about my
poor english)

Sebastian Sdorra

unread,
Aug 23, 2011, 8:06:34 AM8/23/11
to scmma...@googlegroups.com
Hi,
Could you test the follwing configuration:

<VirtualHost *:80>

ServerName scm.mydomain.com

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPassReverseCookiePath / http://localhost:8080/scm/

<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>

Sebastian


2011/8/23 d_d_d <dfdg...@gmail.com>:

d_d_d

unread,
Aug 23, 2011, 11:10:00 AM8/23/11
to scmmanager
Thank you so much!

Works PERFECTLY!

: - )

On Aug 23, 9:06 pm, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> Hi,
> Could you test the follwing configuration:
>
> <VirtualHost *:80>
>
>    ServerName scm.mydomain.com
>
>    ProxyRequests Off
>    ProxyPreserveHost On
>
>    <Proxy *>
>      Order deny,allow
>      Allow from all
>    </Proxy>
>
>    ProxyPass /http://localhost:8080/scm/
>    ProxyPassReverse /http://localhost:8080/scm/
>    ProxyPassReverseCookiePath /http://localhost:8080/scm/
>
>    <Location />
>        Order allow,deny
>        Allow from all
>    </Location>
> </VirtualHost>
>
> Sebastian
>
> 2011/8/23 d_d_d <dfdgs...@gmail.com>:
>
>
>
>
>
>
>
> > Here is my system.
>
> > OSX lion Server 10.7.1
>
> > java version "1.6.0_26"
> > Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511c)
> > Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
>
> > Tomcat 7.0.20
>
> > Apache/2.2.19 (Unix)
> > mod_ssl/2.2.19
> > OpenSSL/0.9.8r
> > DAV/2
> > PHP/5.3.6 with Suhosin-Patch
> > mod_jk/1.2.30
>
> > httpd.conf
> > <VirtualHost *:80>
> >    ServerName scm.mydomain.com
>
> >    ProxyRequests Off
> >    ProxyPass /http://localhost:8080/scm/
> >        ProxyPassReverse /http://localhost:8080/scm/

d_d_d

unread,
Sep 7, 2011, 5:18:48 AM9/7/11
to scmmanager
Hi, again.

I change my reserve proxy server from apache to iis7.5+Application
Request Routing(ARR)+URL Rewrite.

ARR works fine. I tested other services.

But SCM-Manager has some error that I had before with mod_proxy.

Here is my web.config file contents for SCM-Manager reserve proxy.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1"
stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8080/
scm/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Here is my symptoms.

Localhost access that is "http://localhost:8080/scm" works just fine.

"scm.mydomain.com" access look like fine but when I login my server
successfully, immediately I've got error "Your session is expired.
Please relogin." and I have to login again and again.

What should I do? Can I use SCM-manager with reserve proxy(iis7.5 +
ARR + URL Rewriter)?

Sebastian Sdorra

unread,
Sep 7, 2011, 6:09:59 AM9/7/11
to scmma...@googlegroups.com
Hi,
I have no experience with iis, but i think the problem is a wrong
cookie path or host. It is possible to configure the cookie path in
iis, like the ProxyPassReverseCookiePath of apache?

Sebastian

2011/9/7 d_d_d <dfdg...@gmail.com>:

Sebastian Sdorra

unread,
Sep 7, 2011, 6:13:20 AM9/7/11
to scmma...@googlegroups.com
Have a look at this question on stackoverflow
http://stackoverflow.com/questions/5353861/rewrite-rules-for-response-headers-in-iis-7-replacing-the-cookie-path.

Sebastian

2011/9/7 Sebastian Sdorra <s.sd...@gmail.com>:

d_d_d

unread,
Sep 7, 2011, 8:31:25 AM9/7/11
to scmmanager
Thank you so much. I found a solution.

Edit my web.config below this.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1"
stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8080/
scm/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="Update Cookie Path" enabled="true"
patternSyntax="ECMAScript">
<match serverVariable="RESPONSE_Set_Cookie"
pattern="^(.*; path=/)scm/" />
<action type="Rewrite" value="{R:1}" />
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>

Thank you, again.

On 9월7일, 오후7시13분, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> Have a look at this question on stackoverflowhttp://stackoverflow.com/questions/5353861/rewrite-rules-for-response....
>
> Sebastian
>
> 2011/9/7 Sebastian Sdorra <s.sdo...@gmail.com>:
>
>
>
>
>
>
>
> > Hi,
> > I have no experience with iis, but i think the problem is a wrong
> > cookie path or host. It is possible to configure the cookie path in
> > iis, like the ProxyPassReverseCookiePath of apache?
>
> > Sebastian
>
> > 2011/9/7 d_d_d <dfdgs...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages