Nginx proxy server

Hi everyone.
I need to create a mirror site. And I use the server Nginx.
I was able to configure the server. And everything works fine.
But I have a problem when trying to login on my site. If a password is
good
I redirect to the original site (www.example.com). If the password is
bad I
stay on my website. And I do not know how to fix it.
I need professional help.

I am using these configurations:
location / {
resolver 8.8.8.8 ;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Location $host;
proxy_pass http://www.example.com;
proxy_redirect example.com mirorr.com;
proxy_cookie_domain example.com mirorr.com;
proxy_cookie_path / /mirorr/;
proxy_set_header Accept-Encoding “”;
proxy_set_header Referer www.example.com;
proxy_set_header Cookie $http_cookie;
}

I think that I return value Location “www.example.com” to “response
header”.
But how do I change it, I do not know. Or I’m wrong.

Posted at Nginx Forum:

On Mon, Aug 3, 2015 at 12:54 AM, goga [email protected] wrote:

Hi everyone.
I need to create a mirror site. And I use the server Nginx.
I was able to configure the server. And everything works fine.
But I have a problem when trying to login on my site. If a password is good
I redirect to the original site (www.example.com). If the password is bad I
stay on my website. And I do not know how to fix it.
Isn’t this something you can/should handle in the language side? Btw,
which language are you using? PHP, Perl, Python, Ruby?


Thiago F.

Thiago F. Wrote:

nginx Info Page
None. I only use the configuration file in
/etc/nginx/sites-avalible/*.conf
Only settings virtualhosts.

Posted at Nginx Forum: