0

can anyone tell me how to enable the PUT HTTP method globally or just for a single vHost in Apache 2.4 on Ubuntu 16.04? I already tried several things but none work. I have a reverse proxy config for Jira. The config works fine for GET and POST but not PUT. In short it looks like this:

<VirtualHost *:443>
SSLEngine on


# JIRA Proxy Configuration:
<Proxy *>
Order deny,allow
Allow from all
AllowMethods GET POST PUT DELETE OPTIONS
</Proxy>
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>

My 1st approach was with inside my Proxy * config:

<Limit GET POST PUT DELETE OPTIONS>
Require all granted
</Limit> 

after that I tried

<RequireAny>
Require method DELETE GET POST PUT OPTIONS
</RequireAny>

lastly I tried

AllowMethods GET POST PUT DELETE OPTIONS

I always did

apachectl configtest
apachectl restart

Nothing works. Whenever I do a PUT Request via curl it shows

curl -H "Content-Type: application/json" -X PUT -d '{"comment": "I did some work here.","visibility": {"type": "group","value": "jira-developers"},"started": "2017-09-27T13:06:14.160+0000","timeSpentSeconds": 12000}' https:/hostname/rest/api/2/issue/blubb-11/worklog -vvvv
<snip>
> Content-Type: application/json
> Content-Length: 163
>
* upload completely sent off: 163 out of 163 bytes
< HTTP/1.1 405
< Date: Thu, 28 Sep 2017 14:23:45 GMT
< Server: Apache/2.4.18 (Ubuntu)
< X-AREQUESTID: 983x106858x1
< X-ASEN: SEN-4341829
< X-AUSERNAME: anonymous
< Allow: HEAD,POST,GET,OPTIONS
< X-Content-Type-Options: nosniff
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
</snip>

closed as off-topic by Jeff Schaller, Anthon, Hauke Laging, Stephen Rauch, Shadur Oct 8 '17 at 18:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Hauke Laging, Stephen Rauch, Shadur
If this question can be reworded to fit the rules in the help center, please edit the question.

0

The problem was a malformed Jira API Rest request from my side. If the request is wrong Jira sends a somewhat misleading "Allow: HEAD,POST,GET,OPTIONS" even if the Rest Method supports PUT.

Not the answer you're looking for? Browse other questions tagged or ask your own question.