nilsringersma_nl
Basic Pleskian
Dear members,
We're using Plesk on +- 250 servers. All those servers use the latest Plesk for Linux version and run on the CentOS 6/7/8 operating system. Today I noticed that the Nginx Proxy Server and the apache webserver does not accept the HTTP verbs PATCH PUT and DELETE:
NGINX
telnet <hostname> 80
Trying <ip>...
Connected to <hostname>.
Escape character is '^]'.
PUT / HTTP/1.1
host: <hostname>
HTTP/1.1 405 Method Not Allowed
Server: nginx
Date: Tue, 01 Dec 2020 14:59:43 GMT
Content-Type: text/html
Content-Length: 992
Connection: keep-alive
Last-Modified: Mon, 26 Jun 2017 10:38:57 GMT
ETag: "3e0-552da8eeabc0a"
Accept-Ranges: bytes
APACHE
telnet localhost 7080
Trying ::1...
Connected to localhost.
Escape character is '^]'.
PUT / HTTP/1.1
host: <hostname>
HTTP/1.1 405 Method Not Allowed
Date: Tue, 01 Dec 2020 15:38:38 GMT
Server: Apache
Allow: GET,HEAD,POST,OPTIONS
Content-Length: 231
Content-Type: text/html; charset=iso-8859-1
I would like to allow those methods on several servers. In the knowledge base I can only find articles on how to do this for Plesk for Windows here.
Could you let me know how to do this in a neat way for Plesk for Linux? I was aiming on setting it per-domain in the additional headers but perhaps changing the global Nginx/Apache configuration is better. I think I need to enable the ngx_http_dav_module as shown in this article but was hoping someone could give me a push in the right direction.
I would appreciate it if you would let me know on how to accomplish this so that I can roll it out on our entire platform where needed.
Any help is appreciated, thanks in advance!
Edit:
I just learned that Apache implements all relevant HTTP methods for static content (actual files served directly by Apache). For dynamic content (CGI scripts, mod_php, etc), Apache does not care what the HTTP method is (unless it is explicitly restricted with a <Limit> directive), and passes the request to the appropriate handler as it is. Your script needs to handle the specific method as intended, not Apache. Even non-standard methods are passed to dynamic handlers with no problem.
Thread can be closed!
We're using Plesk on +- 250 servers. All those servers use the latest Plesk for Linux version and run on the CentOS 6/7/8 operating system. Today I noticed that the Nginx Proxy Server and the apache webserver does not accept the HTTP verbs PATCH PUT and DELETE:
NGINX
telnet <hostname> 80
Trying <ip>...
Connected to <hostname>.
Escape character is '^]'.
PUT / HTTP/1.1
host: <hostname>
HTTP/1.1 405 Method Not Allowed
Server: nginx
Date: Tue, 01 Dec 2020 14:59:43 GMT
Content-Type: text/html
Content-Length: 992
Connection: keep-alive
Last-Modified: Mon, 26 Jun 2017 10:38:57 GMT
ETag: "3e0-552da8eeabc0a"
Accept-Ranges: bytes
APACHE
telnet localhost 7080
Trying ::1...
Connected to localhost.
Escape character is '^]'.
PUT / HTTP/1.1
host: <hostname>
HTTP/1.1 405 Method Not Allowed
Date: Tue, 01 Dec 2020 15:38:38 GMT
Server: Apache
Allow: GET,HEAD,POST,OPTIONS
Content-Length: 231
Content-Type: text/html; charset=iso-8859-1
I would like to allow those methods on several servers. In the knowledge base I can only find articles on how to do this for Plesk for Windows here.
Could you let me know how to do this in a neat way for Plesk for Linux? I was aiming on setting it per-domain in the additional headers but perhaps changing the global Nginx/Apache configuration is better. I think I need to enable the ngx_http_dav_module as shown in this article but was hoping someone could give me a push in the right direction.
I would appreciate it if you would let me know on how to accomplish this so that I can roll it out on our entire platform where needed.
Any help is appreciated, thanks in advance!
Edit:
I just learned that Apache implements all relevant HTTP methods for static content (actual files served directly by Apache). For dynamic content (CGI scripts, mod_php, etc), Apache does not care what the HTTP method is (unless it is explicitly restricted with a <Limit> directive), and passes the request to the appropriate handler as it is. Your script needs to handle the specific method as intended, not Apache. Even non-standard methods are passed to dynamic handlers with no problem.
Thread can be closed!
Last edited: