url changed in proxy_pass

John Quaglieri john at interserver.net
Fri Feb 1 18:42:57 MSK 2008


Thanks Igor. The proxy_redirect has solved this.



Igor Sysoev wrote:
> On Fri, Feb 01, 2008 at 10:00:15AM -0500, John Quaglieri wrote:
> 
>> It changes in the address bar, in the HTML they remain the same.
> 
> It seems it's redirect.
> Are you sure you use domain.com:81 in proxy_pass, but not 127.0.0.1, etc ?
> 
> You may try
> 
>       if (!-f $request_filename) {
>           break;
>           proxy_pass  http://domain.com:81;
>      }
> 
>      proxy_redirect  http://domain.com:81   http://domain.com;
> 
> Also the debug log will help.
> 
>> Igor Sysoev wrote:
>>> On Fri, Feb 01, 2008 at 09:34:54AM -0500, John Quaglieri wrote:
>>>
>>>> I have nginx installed on port 80 and apache is installed on port 81. I 
>>>> proxy php to apache and have nginx handle all the static and image 
>>>> content.
>>>>
>>>> On my config I have an if statment similar to this:
>>>>
>>>> if (!-f $request_filename) {
>>>>                break;
>>>>                proxy_pass  http://domain.com:81;
>>>>            }
>>>>
>>>> I've noticed that if this is used the url gets rewritten to 
>>>> http://domain.com:81/file
>>>>
>>>> Is there a way to have it not add in :81 into the url?
>>> Where do you see these URLs: inside HTML or redirects ?
>>>
>>>
> 





More information about the nginx mailing list