Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mod rewrite 修改以删除SSO(单点登录)-URL中的连接名称_Mod Rewrite_Apache2_Single Sign On - Fatal编程技术网

Mod rewrite 修改以删除SSO(单点登录)-URL中的连接名称

Mod rewrite 修改以删除SSO(单点登录)-URL中的连接名称,mod-rewrite,apache2,single-sign-on,Mod Rewrite,Apache2,Single Sign On,我有一个SSO url- http://<server>/<junction>/<application_context>/ssoLogin.do e.g. http://pingu.intranet.com/tms/mint/ssoLogin.do 我的conf文件看起来像 ProxyPreserveHost On # define the balancer, with http and/ or ajp connections <Proxy

我有一个SSO url-

http://<server>/<junction>/<application_context>/ssoLogin.do
e.g. http://pingu.intranet.com/tms/mint/ssoLogin.do
我的conf文件看起来像

    ProxyPreserveHost On

# define the balancer, with http and/ or ajp connections
<Proxy balancer://application_cl>
    BalancerMember ajp://pingu01.intranet.com:8009 route=node1 disablereuse=on retry=0
    BalancerMember ajp://pingu02.intranet.com:8009 route=node2 disablereuse=on retry=0
</Proxy>


# Vendor Product ProxyPass Settings
ProxyPass /mint balancer://application_cl/mint stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse /mint balancer://application_cl/mint

# Custom settings to remove junction name for proper javascript loading

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/tms/
RewriteRule ^/tms/(.*)  /$1
</IfModule>


# RequestHeader settings(as per Product documentation)
SetEnvIf X-Forwarded-Proto .+ HAVE_X_FORWARDED_PROTO
RequestHeader set X-Forwarded-Proto "http" env=!HAVE_X_FORWARDED_PROTO

好啊问题解决了。我将所有服务器变量打印为HTTP头,发现SSO连接没有将连接名称传递给web服务器。解决方案:我们创建了一个名为/mint的透明连接。
    ProxyPreserveHost On

# define the balancer, with http and/ or ajp connections
<Proxy balancer://application_cl>
    BalancerMember ajp://pingu01.intranet.com:8009 route=node1 disablereuse=on retry=0
    BalancerMember ajp://pingu02.intranet.com:8009 route=node2 disablereuse=on retry=0
</Proxy>


# Vendor Product ProxyPass Settings
ProxyPass /mint balancer://application_cl/mint stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse /mint balancer://application_cl/mint

# Custom settings to remove junction name for proper javascript loading

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/tms/
RewriteRule ^/tms/(.*)  /$1
</IfModule>


# RequestHeader settings(as per Product documentation)
SetEnvIf X-Forwarded-Proto .+ HAVE_X_FORWARDED_PROTO
RequestHeader set X-Forwarded-Proto "http" env=!HAVE_X_FORWARDED_PROTO