I am trying to set up a content deployment flow, and part of that means 'PUT' to a url provided by Drupal Services module (I'm using their REST services). However, Nginx doesn't like PUT to non static files, I gather.
Where can I let nginx know about Drupal Services urls, and would I have to add the configuration lines piecemeal (one per URL I would like to allow)?
Here is the URL I'm PUTting to:
http://myurl.com/services/rest/file/f3a3a19a-6081-4845-bc9a-58dfe93304e8...
The request has the Session id stored in the 'Cookie' key in the header (I'm using Deploy which does that for me). The payload looks like a JSON encoded file, as expected.
Here is what Nginx sends back:
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
Comments
Comment #1
omega8cc commentedPlease follow submission guidelines, since we don't even know the BOA version you run. We don't block PUT requests on the Nginx level and I don't see any reason why Nginx would respond like that.
Comment #2
omega8cc commentedHmm, we have location like this:
We do this to both support fast static requests and POST dynamic requests, but we should probably do this like this, to send PUT requests to Drupal:
Comment #3
omega8cc commentedThis should do the trick: http://drupalcode.org/project/barracuda.git/commit/944a163
Comment #4
diwant commentedThanks, I see how you did that.
After posting I read that caching/Boost may be complaining about PUT to static files and so I set my Deploy endpoint to "/?q=services/rest" instead of "/services/rest" and that fixed the 405 error.
I think it actually makes sense the way you have it now, PUT on a static file seems bad for caching.
Comment #5
diwant commentedLol just saw you fixed it in a commit as well. I'll let you maintain this issue as you please.
Comment #6
omega8cc commentedOK, thanks!