IIRF反向代理问题

时间:2010-01-30 10:30:21

标签: iis reverse-proxy iirf

我们在Windows 2003上的端口8085上运行了一个java应用程序(Atlassian Bamboo)。它可以作为http:// bamboo:8085访问。

我正在尝试使用IIRF为IIS6设置反向代理,因此可以通过
访问内容   http://竹子。 我似乎正确设置了它,我可以检索状态页面。 这就是我的IIRF.ini的样子:

RewriteLog c:\temp\iirf  
RewriteLogLevel 2
StatusUrl /iirfStatus  
RewriteCond %{HTTP_HOST}   ^bambooi$  [I]  
#This setup works
#ProxyPass ^/(.*)$          http://othersite/$1  
#This does not  
ProxyPass ^/(.*)$          http://bamboo:8085/$1  

然而,当我在IE中输入http:// bamboo时,我得到'页面无法显示'的消息。 FF根本不返回任何内容。 我做了Wireshark网络转储,选择'跟踪TCPstream',似乎正在检索正确的页面。为什么我不能看到它呢?

我也注意到我可以检索http://bamboo/favicon.ico所以我必须非常接近解决方案.. 这是Wireshark输出:

GET / HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
Accept-Language: en-gb
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Accept-Encoding: gzip, deflate
Host: bamboo
Connection: Keep-Alive
Cookie: JSESSIONID=wpsse0zyo4g5

HTTP/1.1 200 200 OK
Date: Sat, 30 Jan 2010 09:19:46 GMT
Server: Microsoft-IIS/6.0
Via: 1.1 DESTINATION_IP (IIRF 2.0)
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Dashboard</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="robots" content="all" />
<meta name="MSSmartTagsPreventParsing" content="true" />

<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />

<link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/grids/grids.css" />
<!--<link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui/build/reset-fonts-grids/reset-fonts-grids.css" />-->
<link rel="stylesheet" href="/s/1206/1/_/styles/main.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/main2.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/global-static.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/widePlanList.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/forms.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/yui-custom.css" type="text/css" />
<link rel="shortcut icon" href="/s/1206/1/_/images/icons/favicon.ico" type="image/x-icon"/>
<link rel="icon" href="/s/1206/1/_/images/icons/favicon.png" type="image/png" />
<link rel="stylesheet" href="/s/1206/1/_/styles/bamboo-tabs.css" type="text/css" />

<!-- Core YUI-->
<link rel="stylesheet" type="text/css" href="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/assets/tabview-core.css">
<link rel="stylesheet" type="text/css" href="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/assets/skins/sam/tabview-skin.css">

<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/event/event-min.js" ></script>
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/dom/dom-min.js" ></script>
<!--<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/animation/animation.js" ></script>-->

<!-- Container -->
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/container/container-min.js"></script>
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/connection/connection-min.js"></script>
<link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/container/assets/container.css" />

<!-- Menu -->
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/menu/menu-min.js"></script>
<link type="text/css" rel="stylesheet" href="/s/1206/1/_/scripts/yui-2.6.0/build/menu/assets/menu.css" />

<!-- Tab view -->
<!-- JavaScript Dependencies for Tabview: -->
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/element/element-beta-min.js"></script>
<!-- Needed for old versions of the YUI -->
<link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/tabview.css" type="text/css" />
<link rel="stylesheet" href="/s/1206/1/_/styles/yui-support/round_tabs.css" type="text/css" />

<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/tabview/tabview-min.js"></script>

<script type="text/javascript"          src="/s/1206/1/_/scripts/yui-2.6.0/build/json/json-min.js"></script>
<script type="text/javascript" src="/s/1206/1/_/scripts/yui-ext/yui-ext-nogrid.js"></script>

<script type="text/javascript" src="/s/1206/1/_/scripts/bamboo.js"></script>

<script type="text/javascript">
    YAHOO.namespace('bamboo');
    YAHOO.bamboo.tooltips = new Object();
    YAHOO.bamboo.contextPath = '';
    YAHOO.ext.UpdateManager.defaults.loadScripts = true;
    YAHOO.ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Currently loading...</div>';
    YAHOO.ext.UpdateManager.defaults.timeout = 60;
    addUniversalOnload(addConfirmationToLinks);
</script>
<link rel="alternate" type="application/rss+xml" title="Bamboo RSS feed" href="/rss/createAllBuildsRssFeed.action?feedType=rssAll" />
</head>
<body>
<ul id="top">
<li id="skipNav">
    <a href="#menu">Skip to navigation</a>
</li>
<li>
    <a href="#content">Skip to content</a>
</li>
</ul>
<div id="nonFooter">

<div id="hd">

<div id="header">
<div id="logo">
    <a href="/start.action"><img src="/images/bamboo_header_logo.gif" alt="Atlassian Bamboo" height="36" width="118" /></a>
</div>
<ul id="userOptions">
    <li id="loginLink">
        <a id="login" href="/userlogin!default.action?os_destination=%2Fstart.action">Log in</a>
    </li>
        <li id="signupLink">
            <a id="signup" href="/signupUser!default.action">Signup</a>
        </li>
    <li id="helpLink">
        <a id="help" href="http://confluence.atlassian.com/display/BAMBOO">Help</a>
    </li>
</ul>
</div> <!-- END #header -->

<div id="menu">
<ul>
    <li><a id="home" href="/start.action" title="Atlassian Bamboo" accesskey="H">  <u>H</u>ome</a></li>
    <li><a id="authors" href="/authors/gotoAuthorReport.action" accesskey="U">A<u>u</u>thors</a></li>
    <li><a id="reports" href="/reports/viewReport.action" accesskey="R"> <u>R</u>eports</a></li>
</ul>
</div> <!-- END #menu -->
</div> <!-- END #hd -->
<div id="bd">
<div id="content">
<h1>Header here</h1>
<div class="topMarginned">
        <div id='buildSummaryTabs' class='dashboardTab'>
        </div>
    <script type="text/javascript">
        function initUI(){
            var jtabs = new YAHOO.ext.TabPanel('buildSummaryTabs');
            YAHOO.bamboo.tabPanel = jtabs;


            // Use setUrl for Ajax loading
            var tab3 = jtabs.addTab('allTab', "All Plans");
            tab3.setUrl('/ajax/displayAllBuildSummaries.action', null, true);

            var tab4 = jtabs.addTab("currentTab", "Current Activity");
            tab4.setUrl('/ajax/displayCurrentActivity.action', null, true);


            var handleTabChange = function(e, activePanel) {
                saveCookie('atlassian.bamboo.dashboard.tab.selected', activePanel.id, 365);
            };

            jtabs.on('tabchange', handleTabChange);

            var selectedCookie = getCookieValue('atlassian.bamboo.dashboard.tab.selected');
            if (jtabs.getTab(selectedCookie))
            {
                jtabs.activate(selectedCookie);
            }
            else
            {
                jtabs.activate('allTab');
            }
        }
        YAHOO.util.Event.onContentReady('buildSummaryTabs', initUI);
    </script>
</div>

<script type="text/javascript">
setTimeout( "window.location.reload()", 1800*1000 );
</script>
<div class="clearer" ></div>      
</div> <!-- END #content -->
</div> <!-- END #bd -->  
</div> <!-- END #nonFooter -->
<div id="ft">
    <div id="footer">
        <p>
            Powered by <a href="http://www.atlassian.com/software/bamboo/">Atlassian Bamboo</a> version 2.2.1 build 1206 -

            <span title="15:59:44 17 Mar 2009">17 Mar 09</span>
        </p>
        <ul>
            <li class="first">
                <a href="https://support.atlassian.com/secure/CreateIssue.jspa?pid=10060&issuetype=1">Report a problem</a>
            </li>
            <li>
                <a href="http://jira.atlassian.com/secure/CreateIssue.jspa?pid=11011&issuetype=4">Request a feature</a>
            </li>
            <li>
                <a href="http://forums.atlassian.com/forum.jspa?forumID=103">Contact Atlassian</a>
            </li>
            <li>
                <a href="/viewAdministrators.action">Contact Administrators</a>
            </li>
        </ul>
    </div> <!-- END #footer -->
</div> <!-- END #ft -->

2 个答案:

答案 0 :(得分:1)

“Via:1.1 DESTINATION_IP(IIRF 2.0)”看起来很有趣。

你试过了吗?

ProxyPass ^/(.*)$          http://localhost:8085/$1

此外,是行:

RewriteCond %{HTTP_HOST}   ^bambooi$  [I]

应该是:

RewriteCond %{HTTP_HOST}   ^bamboo$  [I]

答案 1 :(得分:1)

Sergei,IIRF v2.0中的ProxyPass指令没有正确转发所有请求标头,也没有正确处理分块编码。

要使用ProxyPass,至少应移至IIRF v2.1

ps:您的问题确实属于ServerFault.com