Chassis / chassis_openssl

openSSL module as extension for chassis.io
1 stars 2 forks source link

chassis_openssl

openSSL module as extension for chassis.io. See https://github.com/Chassis/Chassis and http://docs.chassis.io/en/latest/ for a lot more info.

Usage

  1. Clone this into the extensions folder of your Chassis installation. Use recursive: git clone --recursive https://github.com/Chassis/chassis_openssl.git to get the submodule pulled in as well.
  2. Run vagrant reload --provision or just vagrant up
  3. Profit.

Optional Config

By default the certificate and key are regenerated on subsequent vagrant reload --provision & vagrant up. Which means you would need to re-trust the certificate each time, as the certificate serial number changes. To configure to only create if missing, add the following to your config.yaml

# Configure ssl to keep the same cert/key
chassis_openssl:
    cert:
        replace: no
    key:
        replace: no

Notes:

  1. You also need to modify the wp-config.php in the root directory and modify the WP_SITEURL and WP_HOME constants to use https instead of http.
  2. Both the certificate and key are exported to chassis/ directory, so it can be used with local dev servers, like webpack dev server.

Trusting the certificate

In order to avoid security errors and get that nice green padlock in your location bar, you should add the site's SSL certificate to your trust store. The certificate can be found at chassis/{DOMAIN_HERE}.cert .

CLI methods

macOS

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain chassis/{DOMAIN_HERE}.cert

Windows ( running with admin privileges )

certutil -enterprise -f -v -AddStore "Root" "{DOMAIN_HERE}.cert"

GUI methods

Firefox on any operating system:

Or alternatively:

Chrome or Safari on Mac:

IE and Edge on Windows ( reference )

Other browsers / platforms

Please submit pull-requests for instructions for browsers/platforms not listed above.

Contributors

Props to @javorszky for the initial versions of the extension, and our contributors.