I'm trying to move a custom PHP application from XAMPP on my laptop to Azure and keep running into a 404 Failed to load resource error such as "/bitnami-error-php-fpm-did-not-handle-the-connection/data/wti.data". I've done a ton of research on this but it seems to me like the issue lies in the .htaccess file that I'm using locally and how it should be translated to the bitnami set up.
My steps to set up my environment are as follows:
- Start small instance from Bitnami Azure Launchpad
- When it's up and running clear out the /opt/bitnami/apache2/htdocs directory since I want to put my app in there
- Upload my app into htdocs, configure my MySQL instance
At this point when I try to hit my app from Chrome I get a couple of the php-fpm-did-not-handle errors on files that end in .data and .html. On my local setup I'm using an .htaccess file with the following contents:
AddType application/x-httpd-php .html .htm .cache .data
RewriteRule ^json/(.*)/(.*) ./includes/data.php?dir=$1&data=$2 [NC]
RewriteRule ^json/(.*) ./includes/data.php?data=$1 [NC]
RewriteRule ^css/(.*) ./includes/css.php?call=$1 [NC]
I'm guessing that the reason I'm getting 404 errors on files ending in .data and .html and not files that end in .png have to do with these rewrite rules. Can anyone help me understand how to translate the .htaccess rules I have into something that Bitnami will resolve?