Nginx reverse proxy issue

Igor Sysoev igor at sysoev.ru
Wed Jan 26 19:33:52 MSK 2011


On Wed, Jan 26, 2011 at 02:36:01PM +0100, Robin Diederen wrote:

> Hello all,
> 
> 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. 
> 
> 
> From the Nginx configuration: 
> 
> location / { proxy_pass  http://theproxiedserver/somepath; } 
>  
> 
> 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:
> 
> At X. Suite.ASP.ASPInstance..ctor(String strRootURL)
> 
> at X.Suite.General.GetASPInstanceID()
> 
> at X.Suite.iPortal.Skin.Global_asax.InitializeApplication()
> 
> at X.Suite.iPortal.Skin.Global_asax.Application_BeginRequest(Object sender, EventArgs e)
> 
> at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
> 
> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Probably you need

location / {
     proxy_pass  http://theproxiedserver/somepath;
     proxy_set_header   Host   thepublicservername;
     # or
     proxy_set_header   Host   $host;
} 


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list