Welcome! Log In Create A New Profile

Advanced

proxy_pass to remote server directory only ?

Posted by George 
proxy_pass to remote server directory only ?
October 07, 2011 09:20PM
Hi I am trying to do the following,

proxy_pass domain1.com/download directory to domain2.com/download but it results in 404 errors when actually downloading anything from domain1.com/download/*

location /download {
proxy_pass http://domain2.com/download;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

note: domain1.com is served from nginx v1.1.4 and domain2.com served on separate server apache based.

when i visit domain1.com/download, i can see the directories content as it is on domain2.com/download but clicking on any zip file or image file and I get 404 page not found ?

does domain1.com/download need to have the actual files on the server ? as it doesn't have those files right now, as I want domain1.com/download to look for and download files at domain2.com/download

thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 324
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready