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

Proxy multiple services #7

Closed
bripkens opened this issue Jan 11, 2015 · 3 comments
Closed

Proxy multiple services #7

bripkens opened this issue Jan 11, 2015 · 3 comments

Comments

@bripkens
Copy link
Owner

It should be possible to proxy multiple services. We are currently doing this via try_files for a single named location, but might need to switch to multiple locations with paths to implement this.

@bripkens
Copy link
Owner Author

Some hint from @city41's comment on issue #6:

Yeah my nginx.conf has multiple location directives in it.

My use case is one of my services is a RESTful API, and the other provides dynamic HTML. Otherwise I could just use a static directory for the HTML service.

bripkens added a commit that referenced this issue Jan 17, 2015
@bripkens
Copy link
Owner Author

@city41: proxrox now supports multiple proxies via configuration files. The strategy is actually quite similar to what you have purposed but additionally supports fallbacks to proxies via try_files.

Example:

serverName: 'moviedatabase.com'
root: false
port: 80
proxy:
  '/': 'http://localhost:8080/movie-app/'
  '/movie-app/': 'http://localhost:8080/movie-app/'
  '/actor-app/': 'http://localhost:8082/actor-app/'

@city41
Copy link

city41 commented Jan 19, 2015

Awesome! Works great, thanks!

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

No branches or pull requests

2 participants