Re: Proxying and static files

2017-02-21 Thread Alan Orth
Hi, The try_files directive is great for this[0]. But like Francis pointed out, you need to have a pattern that can be matched for static files, and then nginx can look for the files on disk (relative to the root) before proxying the request back to the dynamic application. Regards, [0] http://n

Re: Proxying and static files

2017-02-16 Thread Francis Daly
On Thu, Feb 16, 2017 at 08:26:35AM -0500, epoch1 wrote: Hi there, > I've tried something like the following but can't get it work for each app: > location ~* /(images|css|js|files)/ { > root /home/username/app1/public/; > } > > If I request app1/js/script.js for example it goes to > /home/us

Proxying and static files

2017-02-16 Thread epoch1
Hi I have a number of apps running behind nginx and I want to configure nginx so that is serves static content (js and css files) from the pulic directory of each app directly rather than proxying these requests, for example: myserver.com/app1 dynamic requests proxied to hypnotoad (perl server)