I am deploying my first yii2 api on Digital ocean with ubuntu 16.04. I receive a 404 not found response for all request i make to the API. This same API works fine locally without any issues.
I have setup LAMPP and link up my DB to my API, I have installed an SSL Certificate to the domain and it works great. When i host the API as follows; /var/www/html/myfolder/api/....
no request works on this API eg
https://example.com/myfolder/api/web/v1/beforeauths/trending
I have a .htaccess inside .../api/web with the following rules
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
I also have an .htaccess inside ../api folder with the following containg
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ web/$1 [L]
</IfModule>
# Deny accessing below extensions
<Files ~ "(.json|.lock|.git)">
Order allow,deny
Deny from all
</Files>
# Deny accessing dot files
RewriteRule (^\.|/\.) - [F]
I do not know what I have miss out surely in my configurations. Any help on this will be great