Hello all
I have a problem to configure Nginx, i want to redirect any file iso
from http to ftp. but i don’t know how?
example:
all iso (big file) located at http://fileserver.example.org/iso i want
to redirect any request to ftp://fileserver.example.org/iso
any solutions?
–
udienz (Mahyuddin S.)
site = http://blog.udienz.net
“The best way to predict the future is to create it!” Jason Kaufmann
Hello!
On Sat, Nov 28, 2009 at 05:58:37PM +0700, Mahyuddin S. wrote:
Hello all
I have a problem to configure Nginx, i want to redirect any file iso
from http to ftp. but i don’t know how?
example:
all iso (big file) located at http://fileserver.example.org/iso i want
to redirect any request to ftp://fileserver.example.org/iso
any solutions?
http://wiki.nginx.org/NginxHttpRewriteModule#rewrite
Maxim D.
Hello Maxim
2009/11/28 Maxim D. [email protected]:
to redirect any request to ftp://fileserver.example.org/iso
any solutions?
Module ngx_http_rewrite_module
Maxim D.
i still have a problem. here is my configuration
location ~* ^.+\.(iso|md5)$ {
proxy_pass ftp://192.168.1.1/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
On Sat, Nov 28, 2009 at 7:45 PM, Mahyuddin S. [email protected]
wrote:
i still have a problem. here is my configuration
   location ~* ^.+.(iso|md5)$ {
   proxy_pass ftp://192.168.1.1/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
no, you can’t do this.
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
2009/11/28 Edho P Arief [email protected]:
no, you can’t do this.
hm… ic ic… i try another method
rewrite ^.+.(iso)$ ftp://10.10.2.73/iso/$1 permanent;
and i still got error, because any request iso files only redirect to
ftp://192.168.1.1/iso
fallen:~$ wget
http://10.10.3.243:8080/iso/ubuntu/karmic/ubuntu-9.10-alternate-i386.iso
–2009-11-28 20:08:12–
http://10.10.3.243:8080/iso/ubuntu/karmic/ubuntu-9.10-alternate-i386.iso
Connecting to 10.10.3.243:3128… connected.
Proxy request sent, awaiting response… 301 Moved Permanently
Location: ftp://10.10.2.73/iso/iso [following]
–2009-11-28 20:08:12-- ftp://10.10.2.73/iso/iso
Connecting to 10.10.3.243:3128… connected.
Proxy request sent, awaiting response… 404 Not Found
2009-11-28 20:08:13 ERROR 404: Not Found.
–
udienz (Mahyuddin S.)
site = http://blog.udienz.net
On Sat, Nov 28, 2009 at 8:08 PM, Mahyuddin S. [email protected]
wrote:
2009/11/28 Edho P Arief [email protected]:
no, you can’t do this.
hm… ic ic… i try another method
rewrite ^/iso/(.+.iso)$ ftp://10.10.2.73/iso/$1 permanent;
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
2009/11/28 Edho P Arief [email protected]:
great! it works now!
thanks Edho!