Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README not helping as much as it could to create a reverse proxy #751

Closed
alex-harvey-z3q opened this issue Jan 27, 2016 · 2 comments
Closed

Comments

@alex-harvey-z3q
Copy link
Contributor

I had a simple requirement to proxy port 80 through to a Kibana 4 application running on localhost:5601.

The README seems to imply that I need to do something like this:

include nginx
nginx::resource::upstream { $::fqdn:
  members => [ 'localhost:5601' ],
}
nginx::resource::vhost { $::fqdn:
  proxy => "http://${::fqdn}",
}

(By the way, this led to a very unhappy Nginx that had lots of (24: Too many open files) messages when I tried to connect to it.)

I found the answer in the tests directory:

include nginx
nginx::resource::vhost { "${::fqdn}:80":
  ensure      => present,
  listen_port => 80,
  server_name => ["${::fqdn} ${::hostname}"],
  proxy       => 'http://localhost:5601',
}

which can be simplified to:

include nginx
nginx::resource::vhost { "${::fqdn}:80":
  proxy       => 'http://localhost:5601',
}

I would recommend making the documentation clearer for this simple use-case.

@alex-harvey-z3q alex-harvey-z3q changed the title README not helping to create a reverse proxy README not helping as much as it could to create a reverse proxy Jan 27, 2016
@jfryman
Copy link
Contributor

jfryman commented Jan 27, 2016

@alexharv074 Think you could submit a PR with a better example? Would be great to have that captured for others in the future. 🙏 and 🙇

@alex-harvey-z3q
Copy link
Contributor Author

PR raised #752

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants