Skip to content

Instantly share code, notes, and snippets.

@LittleCoding
LittleCoding / ApacheHTTPSConfig.md
Last active June 12, 2018 15:16 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (macOS, High Sierra)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with macOS High Sierra (10.13.4) running Apache 2.4.29
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@LittleCoding
LittleCoding / node_edit_form_d8.php
Last active October 4, 2016 15:24 — forked from aklump/node_edit_form_d8.php
Programmatically embed an entity edit form in Drupal 8
<?php
// Without the use of D.I.
$form = \Drupal::service('entity.manager')
->getFormObject('{ENTITY_TYPE}', 'default')
->setEntity($entity);
$build[] = \Drupal::formBuilder()->getForm($form);
// Within a class using D.I.
class someClass {