<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebAccess v6.40.3-23410">
  <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
  <title>RE: Nginx reverse proxy issue</title>
  <style type="text/css">
      body
      {
        font-family: Arial, Verdana, Sans-Serif;
        font-size: 12px;
        padding: 5px 5px 5px 5px;
        margin: 0px;
        border-style: none;
        background-color: #ffffff;
      }

      p, ul, li
      {
        margin-top: 0px;
        margin-bottom: 0px;
      }
  </style>
</head>
<body>
<p>Hello Igor,<br /><br />Thanks so much for your help.<br /><br />I tried your suggestions but sadly to no result; the ASP.NET app returns the same result.<br /><br />Now I&#39;m wondering: when I connect to the IIS server by IP instead of its DNS name, I get the same error (only difference is that css works here). My guess would be the server is using name based virtual hosting. <br /><br />So I tried to change the Host value in header to the IIS server&#39;s DNS name. When I connect to the IIS server, I am redirected to the IIS server. <br /><br />What could I do to make this work? I presume this is a general error regarding reverse proxying with name based virtual hosting?<br /><br />Best, Robin<br />&nbsp;</p><blockquote style="border-left: 2px solid rgb(50, 95, 186); padding-left: 5px; margin-left: 5px;">-----Original message-----<br /><strong>To:</strong>        nginx@nginx.org; <br /><strong>From:</strong>        Igor Sysoev &lt;igor@sysoev.ru&gt;<br /><strong>Sent:</strong>        Wed 26-01-2011 17:37<br /><strong>Subject:</strong>        Re: Nginx reverse proxy issue<br />On Wed, Jan 26, 2011 at 02:36:01PM +0100, Robin Diederen wrote:<br /><br />&gt; Hello all,<br />&gt; <br />&gt; For the last few days I&rsquo;ve been trying Nginx as a reverse proxy in front of an IIS webserver with an ASP.NET webapp. <br />&gt; <br />&gt; <br />&gt; From the Nginx configuration: <br />&gt; <br />&gt; location / { proxy_pass&nbsp; http://theproxiedserver/somepath; } <br />&gt; &nbsp;<br />&gt; <br />&gt; When I visit http://nginx I see an error generated by &ldquo;theproxiedserver&rdquo;; from this I conclude that the basic proxying is working. The error more or less tells me the ASP application has issues fetching its URL. Can I somehow convince Nginx to work around this issue? The IIS server is a blackbox, no modifications can be made there. My stracktrace:<br />&gt; <br />&gt; At X. Suite.ASP.ASPInstance..ctor(String strRootURL)<br />&gt; <br />&gt; at X.Suite.General.GetASPInstanceID()<br />&gt; <br />&gt; at X.Suite.iPortal.Skin.Global_asax.InitializeApplication()<br />&gt; <br />&gt; at X.Suite.iPortal.Skin.Global_asax.Application_BeginRequest(Object sender, EventArgs e)<br />&gt; <br />&gt; at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br />&gt; <br />&gt; at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)<br /><br />Probably you need<br /><br />location / {<br /> &nbsp; &nbsp; proxy_pass&nbsp; http://theproxiedserver/somepath;<br /> &nbsp; &nbsp; proxy_set_header &nbsp; Host &nbsp; thepublicservername;<br /> &nbsp; &nbsp; # or<br /> &nbsp; &nbsp; proxy_set_header &nbsp; Host &nbsp; $host;<br />} <br /><br /><br />-- <br />Igor Sysoev<br />http://sysoev.ru/en/<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://nginx.org/mailman/listinfo/nginx<br /></blockquote>
</body>
</html>