开发者

IIRF reverse proxy problem

We have a java application ( Atlassian Bamboo) running on port 8085 on Windows 2003. It is accessile as http: //bamboo:8085.

I am trying to setup reverse proxy for IIS6 using IIRF so content is accessible via

http: //bamboo. It seems that I set it ip correctly, and I can retrieve Status page. This is how my IIRF.ini looks like:

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  

However when I type in http: //bamboo in IE, I get 'page cannot be displayed ' message. FF does not return anything at all. I made Wireshark network dump, selected 'follow TCPstream' and it seems like correct page is being retrieved.Why cannot I see it then?

I also noticed that I can retrieve http: //bamboo/favicon.ico so I must be very close to the solution.. This is the Wireshark output:

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<开发者_StackOverflow/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 -->


Sergei, the ProxyPass directive in IIRF v2.0 did not correctly forward all Request headers, nor did it properly handle chunked encoding.

To use ProxyPass, you should move to IIRF v2.1, at least.

ps: your question really belongs on ServerFault.com


That "Via: 1.1 DESTINATION_IP (IIRF 2.0)" looks interesting.

Have you tried:

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

Also, is the line:

RewriteCond %{HTTP_HOST}   ^bambooi$  [I]

supposed to be:

RewriteCond %{HTTP_HOST}   ^bamboo$  [I]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜