[erlang-questions] Static files served through Webmachine
Jack Moffitt
jack@REDACTED
Tue Jul 19 04:39:35 CEST 2011
> Can anyone think of a way I can keep the nice URLs and serve the static html
> files through nginx or another webserver.
The typical solution to this is to reverse proxy webmachine under
nginx. You can set pattern matches in Nginx which will forward dynamic
traffic to webmachine running on a different port (invisibly to the
client) and serve static content in all its optimized nginx glory.
Here's something from my own setup which forward /reset and /forgot to
webmachine:
location /forgot {
proxy_pass http://127.0.0.1:8191
}
location /reset {
proxy_pass http://127.0.0.1:8191;
}
This will cause /reset to go to http://127.0.0.1:8191/reset.
Webmachine runs on port 8191.
jack.
More information about the erlang-questions
mailing list