Control Web Panel

WebPanel => PHP => Topic started by: smartelite on June 02, 2020, 05:13:23 AM

Title: Issue with wp-json api
Post by: smartelite on June 02, 2020, 05:13:23 AM
Hello

Good Day

I have an issue with wp-json api .

It show 403 for api path

and put is not working

also api save not working

please help

(https://alkaraz.sa/wp-content/uploads/2020/06/wp-josn-issue-scaled.jpg)
Title: Re: Issue with wp-json api
Post by: smartelite on July 07, 2020, 07:47:29 PM
Hello

Good day!


I resolve this issue by add  "Require all granted" under

WebServers Configuration Editor > apache >  /usr/local/apache/conf.d/vhosts/

open website host without ssl

Code: [Select]
<Directory "/home/example/public_html">
Options -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
                Require all granted
</Directory>

With ssl

Code: [Select]
<Directory "/home/example/public_html">
Options -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
                Require all granted
SSLRequireSSL
</Directory>




It will fix any issue with api and error 404 / 403 /410 also nod js app it will work.