A
A
Andrey Raboy2016-02-02 00:32:43
Apache HTTP Server
Andrey Raboy, 2016-02-02 00:32:43

How to allow PUT and DELETE methods in Apache?

Guys, for educational purposes, you need to allow the PUT and DELETE methods (HTTP / 1.1), I know that it is not safe, I play in the sandbox, I wonder how they work. Ubuntu + Apache2.
and, in pursuit, if the rights to the folder are not 777, then where to specify the login and password? Something Google is silent (((
Logically, like this:

PUT /localhost/my_file.txt HTTP/1.1
host: user:[email protected]
Content-Length: 9

some_text

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-02-02
@DP-Studio

<Directory />
 Options -Indexes
 AllowOverride All
 Allow from all
 <Limit GET POST PUT DELETE>
  Order allow,deny
  Allow from all
 </Limit>
</Directory>

N
Nazar Mokrinsky, 2016-02-02
@nazarpc

What does unsafe mean? It is perfectly acceptable to use. And this cannot be allowed if it was not previously prohibited, because by default there are no such prohibitions.
The $_POST array will be empty, obviously, but you can pull out the request data in another way and put it in the same $_POST, here's an example .
501 means that it's either your framework or something else that generates such an error. This is not an Apache issue, it is the handler that needs to be registered correctly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question