Problems with proxy...

Robert Gabriel lists at ruby-forum.com
Fri Oct 24 14:25:13 MSD 2008


I have created a subdomain, which will connect to another webside for
the "data", and Im trying to do that with proxy_pass, but when I am
trying out, always the subdomain will redirect me to the actually
website from where I wanna get the "data"

The subdomain conf is this:

server {
  listen   80;
  server_name  sys.example.org *.sys.example.org;

  access_log  /var/log/nginx/sys-access_log;
  error_log  /var/log/nginx/sys-error_log info;

  location / {
    root   /srv/www/example.org;
    index  index.php index.html index.htm;
  }

  location / {
    proxy_pass        http://www.example.net/system;
    proxy_redirect    off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  #error_page  404  /404.html;

  # redirect server error pages to the static page /50x.html
  #
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   /var/www/nginx-default;
  }

}

Please let me know what Im doing wrong.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list