Hi there!
Apologies if this is covered anywhere, but if it is I can't find it!
Basically I need to know how to use try_files if the request method is GET, if it's not I want it to skip straight to passenger.
My config currently looks like this:
server {
server_name railsapp.local;
root /Users/i0n/Sites/railsapp/public;
location / {
try_files $uri /$host/$uri/index.html /$host/$uri.html /$host/$uri @passenger;
}
location @passenger {
passenger_enabled on;
}
}
I have been running Nginx with passenger and rails for a while and it normally works great.
Recently I have been working on a rails app that needs to work a bit differently than normal, it has multiple domains and therefore I have changed the page caching to create directories for each domain inside the public folder. try_files is working for this, but has created a problem where non GET request are returning 405 errors as Nginx is finding the static cached pages. I've been trying to figure this out for a couple of days now with no luck, any help would be much appreciated!