I'm trying to deploy a laravel 5.8 application to Azure, but I'm getting the following error;
"SSL connection is required. Please specify SSL options and retry."
In the config folder there wasn't a database.php file, so I created one using the database.php in the Laravel Git Repository. I downloaded the BaltimoreCyberTrustRoo.crt.pem file from MS and placed this inside the root of my application inside a folder called ssl. I've then modified the database.php file to this;
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'sslmode' => env('DB_SSLMODE', 'prefer'),
'options' => (env('MYSQL_SSL') && extension_loaded('pdo_mysql')) ? [
PDO::MYSQL_ATTR_SSL_KEY => base_path('ssl/BaltimoreCyberTrustRoot.crt.pem'),
] : []
],
However, even with this change, I'm still seeing the same error.
I've attached a screenshot of the folder structure incase it is useful.



