Month: December 2017

WordPress: Redirect HTTP to HTTPS in Apache

To redirect all of your HTTP traffic to HTTPS on WordPress installations using an Apache web server, add the following code to your .htaccess file. This is the recommended method for redirecting WordPress running on Apache.


RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R=301,L]

This should begin to work immediately.

Satellite Server Automated Reboot

Automating the patch cycle with Satellite v6 series is not all that difficult, with one gotcha, rebooting.  My initial setup had a test to see if there were any patches that would require a reboot and if so reboot.  However, the servers did not reboot as expected.  It seems the remote execution process was skipping the reboot command due to some delay.  The fix is to issue the following command which provides enough of a delay to have the reboot command picked up and executed.  The same holds true when using the shutdown command.

echo restart host && sleep 3