Author Topic: How to Enable PUT and DELETE http methods?  (Read 9214 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to Enable PUT and DELETE http methods?
« on: July 27, 2020, 03:24:06 PM »
Is there anyway that I can enable PUT and DELETE methods? One of the reason - magento 2.3. use them on checkout page to apply and remove promotion code. This was tested on fresh installations with several configurations and issues apply only on the CWP.

 VM212457:654 PUT https://www.domain.com/rest/default/V1/guest-carts/xxxxxxx/coupons/test2020 404

Offline
*****
Re: How to Enable PUT and DELETE http methods?
« Reply #1 on: July 28, 2020, 02:24:51 AM »
hi what error you're exactly getting and error log entry ?

Offline
*
Re: How to Enable PUT and DELETE http methods?
« Reply #2 on: July 28, 2020, 11:23:25 AM »
Thank You for the response...
I get always same error:
Code: [Select]
[Mon Jul 27 18:20:29.772165 2020] [authz_core:error] [pid 17053:tid 140682995955456] [client my.ip:42678] AH01630: client denied by server configuration: /home/accname/public_html/rest, referer: https://domine.com/checkout/
[Tue Jul 28 07:05:49.692786 2020] [authz_core:error] [pid 3730:tid 139864687187712] [client my.ip:52588] AH01630: client denied by server configuration: /home/accname/public_html/rest, referer: https://domine.com/checkout/
[Tue Jul 28 07:08:27.576056 2020] [authz_core:error] [pid 6011:tid 140128720733952] [client my.ip:52697] AH01630: client denied by server configuration: /home/accname/public_html/rest, referer: https://domine.com/checkout/

Mod Security is:  Not installed
Reverse proxy removed
Varnish removed
Magento 2.3.2 and above tested

Apache version: Apache/2.4.41
PHP version: 7.2.24
MySQL version: 10.1.44-MariaDB
FTP version: 1.0.47
Web Servers: apache-only
CWPpro version: 0.9.8.998
CPU Model: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
CPU Details: 6 Core (2400 MHz)
Distro Name: CentOS Linux release 7.8.2003 (Core)
Kernel Version: 3.10.0-1127.el7.x86_64
Platform: x86_64 kvm


Offline
*****
Re: How to Enable PUT and DELETE http methods?
« Reply #3 on: August 10, 2020, 04:19:41 PM »
Check the files and folders permissions, owner. Remove any “Order deny,allow”, “Order allow,deny”, and related lines from .htaccess.
Must be used require all granted/denied instead.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: How to Enable PUT and DELETE http methods?
« Reply #4 on: August 12, 2020, 01:44:12 PM »
Open WebServers Configuration Editor in CWP admin,
Move to "Apache" tab
Move to "/usr/local/apache/conf.d/vhosts" tab

Edit the conf file of the domain

add this to the <Directory "/home/username/public_html"> section:

Require method GET POST PUT OPTIONS DELETE

be careful with the spacing and enters!
Restart Apache in the dashboard

Offline
*
Re: How to Enable PUT and DELETE http methods?
« Reply #5 on: January 17, 2024, 05:31:31 AM »
Life saver, thanks!!!

 ;D
Web Design, Development & Web Hosting
https://6sense.com.au