Forum: NGINX Forward proxy preserving the domain

2974d09ac2541e892966b762aad84943?d=identicon&s=25 dandv (Guest)
on 2014-07-04 03:31
(Received via mailing list)
Basically, I want to set up a proxy running on that
will take any URI, retrieve `$request_uri`, and pass it on to
client, preserving my domain for the client.

So far I have this config:

server {
  location / {
    resolver;  # why exactly is this necessary?

It works, but what happens is that nginx returns a `HTTP/1.1 301 Moved
Permanently` response, with `Location` set to$request_uri. How is this different from the rewrite
directive, or from `return 301$request_uri` ?

I want instead a straight response of the actual contents at$request_uri. How can I do that?

PS: what in the world are the formatting codes for this forum?
[code]...[/code] doesn't work; not even [b]...[/b] does. Yeah, sorry for
indenting my code above - no idea how to do it.

Posted at Nginx Forum:,251449,251449#msg-251449
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.