how to configure nginx as a reverse proxy like this?

Delta Yeh delta.yeh at gmail.com
Tue Oct 28 09:20:33 MSK 2008


Please try:


server{
server_name your_server_name;

location/storage1/upload {
  proxy_pass http://storage1:80;
}

location/storage1/download {
  proxy_pass http://storage1:81;
}
location/storage2/upload {
  proxy_pass http://storage2:80;
}

location/storage2/download {
  proxy_pass http://storage2:81;
}

....

}

2008/10/28 yong xue <ultraice at gmail.com>

>
>
> i want to use nginx as a reverse proxy.
>
> the back end is some storages. lets say storage1, storage2.
>
> there are two service running in each storage,
>  one for upload on port 80, and one for download on port 81
> so with nginx i want
> http://hostname/storage1/upload/filename  forward to storage1 port80
>  http://hostname/storage1/download/filename  forward to storage1 port81
>  http://hostname/storage2/upload/filename  forward to storage2 port80
>  http://hostname/storage2/download/filename  forward to storage2 port81
>
> how can i get this?
>
> thx in advance.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20081028/486c7305/attachment.html>


More information about the nginx mailing list