Skip to content
Snippets Groups Projects
Commit a3e5200f authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Fixes wordpress https \o/

parent 7e93832f
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ if [[ $DB_CONNECTABLE -eq 0 ]]; then ...@@ -53,7 +53,7 @@ if [[ $DB_CONNECTABLE -eq 0 ]]; then
echo "=> Installation of Wordpress" echo "=> Installation of Wordpress"
PASS=`openssl rand -base64 15` PASS=`openssl rand -base64 15`
cd /app cd /app
wp --allow-root core install --url=${URL} --title=${URL} --admin_user=${EMAIL} --admin_password=${PASS} --admin_email=${EMAIL} wp --allow-root core install --url=https://${URL} --title=${URL} --admin_user=${EMAIL} --admin_password=${PASS} --admin_email=${EMAIL}
wp --allow-root plugin install wordpress-https wp --allow-root plugin install wordpress-https
wp --allow-root plugin activate wordpress-https wp --allow-root plugin activate wordpress-https
echo "=> Done!" echo "=> Done!"
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
* @package WordPress * @package WordPress
*/ */
define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
// ** MySQL settings - You can get this info from your web host ** // // ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */ /** The name of the database for WordPress */
define('DB_NAME', getenv('DB_NAME')); define('DB_NAME', getenv('DB_NAME'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment