Forum: NGINX Problems with proxy...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
15fc40290c76b33850cc13438566b072?d=identicon&s=25 Robert Gabriel (jinx)
on 2008-10-24 12:25
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.
This topic is locked and can not be replied to.