Welcome! Log In Create A New Profile

Advanced

Re: Forward requests for one domain to another without changing URL.

August 01, 2009 12:49PM
On Sat, Aug 01, 2009 at 09:20:21AM +0000, Richard Cooper wrote:

> I can't seem to find enough information about the proxy or rewrite modules for
> nginx to try and work this out myself, but what I'm trying to do is have the
> pages served at one domain available at another domain on a slightly different
> path.
>
> If it helps I'm running Django under FASTCGI behind nginx behind Apache for
> my-stuff.com and I need to add rules for my-books.com such that:-
>
> http://my-books.com/book1/ serves the page at http://my-stuff.com/books/book1/
> http://my-books.com/book2/ serves the page at http://my-stuff.com/books/book2/
> ... etc.
>
> The important thing is not to re-direct as I want pages available at _both_ urls.

Could you show a request path ? For example, as

my-books.com/book1/ > my-stuff.com/books/book1/

nginx can proxy

location / {
proxy_pass http://backend/book/;
}

or

location /book/ {
proxy_pass http://backend/;
}

BTW, why do you run nginx behind Apache ? nginx has been designed to run
before Apache.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Forward requests for one domain to another without changing URL.

frozenskys August 01, 2009 05:20AM

Re: Forward requests for one domain to another without changing URL.

Igor Sysoev August 01, 2009 12:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready