I serve / foo / bar / through proxypass and want to keep doing this. However, I would like to install /foo/bar/baz.swf statically from the site /var/www/mystatic/baz.swf, etc.
I was hoping I could do something like
location /foo/bar/(.*) { alias /var/www/mystatic/; } location / { proxy_pass ....; ... }
And / foo / bar / will go to the application server while / foo / bar / (. *) Is served statically.
The docs say that I cannot do this and you need to use the root combination and rewrite: http://wiki.nginx.org/NginxHttpCoreModule
Adding to the complication, I would like to continue to use the ancient, unsupported 0.5.33. Any help would be greatly appreciated.
Edit: move forward, someone suggested using root instead of an alias. But it seems like I can't use any regex in the location directive with my version? Here, /foo/bar/baz.swf is served by proxy_pass! I have a file on /var/www/foo/bar/baz.swf.
location /foo/bar/(.+) { root /var/www/; }
source share