Hginx proxy server for mirror site

Discussion in 'HOWTO-Related Questions' started by Goga, Jul 31, 2015.

  1. Goga

    Goga New Member

    Hi everyone.
    I need to create a mirror site. And I use the server Hginx.
    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 ;
    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.

Share This Page