rewriting a redirect

Jonathan Vanasco jvanasco at 2xlp.com
Thu Mar 1 18:05:40 MSK 2007


On Mar 1, 2007, at 7:51 AM, Jure Pečar wrote:

>
> Hello all,
>
> I run nginx on port 80 in front of apache with mod_backhand on port  
> 81 on the same machine, which does the load balancing across  
> backend apache servers.
>
> Our application makes a redirect on a few rarely visited places and  
> there apache generates a redirect in the form of http://domain:81/ 
> place/to/go. Thats get fed to the client, which sees a "connection  
> refused" because of the closed 81 port.
>
> What is the right way to fix this?
>
> Obviously I need to rewrite that :81 somewhere into :80 or throw it  
> away alltogether. I just don't understand the http proxying fully  
> enough to see the solution. I think I either need some  
> RewriteEngine magic on apache side or some proper rewrite statement  
> on nginx side.

You should be making the redirect to port 80
	http://domain:81/place/to/go
		becomes
	http://domain/place/to/go

and let nginx handle the proxying to port 81

or

open up port81 requests to ips other than localhost.

port 81 is technically reserved in IANA for something else ( as is  
port 82, though neither are still used ).  you should really be  
running that on port 8000 , 8001, 8080, 8081 , etc


	



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -







More information about the nginx mailing list