<!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'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'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 /> </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 <igor@sysoev.ru><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 />> Hello all,<br />> <br />> For the last few days I’ve been trying Nginx as a reverse proxy in front of an IIS webserver with an ASP.NET webapp. <br />> <br />> <br />> From the Nginx configuration: <br />> <br />> location / { proxy_pass http://theproxiedserver/somepath; } <br />> <br />> <br />> When I visit http://nginx I see an error generated by “theproxiedserver”; 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 />> <br />> At X. Suite.ASP.ASPInstance..ctor(String strRootURL)<br />> <br />> at X.Suite.General.GetASPInstanceID()<br />> <br />> at X.Suite.iPortal.Skin.Global_asax.InitializeApplication()<br />> <br />> at X.Suite.iPortal.Skin.Global_asax.Application_BeginRequest(Object sender, EventArgs e)<br />> <br />> at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br />> <br />> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)<br /><br />Probably you need<br /><br />location / {<br /> proxy_pass http://theproxiedserver/somepath;<br /> proxy_set_header Host thepublicservername;<br /> # or<br /> proxy_set_header Host $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>