This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 642
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1088 from oxyc/docs-makeover
Issue #1092: Docs makeover
- Loading branch information
Showing
48 changed files
with
521 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Drupal VM's configuration works with multiple operating systems _and_ with multiple webservers. You can switch between Apache and Nginx (depending on which server you prefer) with ease. Apache is the webserver used out of the box. | ||
|
||
You have complete control over all aspects of Apache VirtualHosts using the `apache_vhosts` configuration. A few simple examples are shown in `default.config.yml`, but this configuration can be much more complex. | ||
|
||
See the examples included in the [`geerlingguy.apache` Ansible role's README](https://github.com/geerlingguy/ansible-role-apache#readme) for more info, as well as many other variables you can override to configure Apache exactly how you like it. | ||
|
||
## Enable SSL Support with Apache | ||
|
||
To enable SSL support for you virtual hosts you first need a certificate file. You can generate a self-signed certificate with a command like | ||
|
||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout example.key -out example.crt | ||
|
||
_If you're using an actual production certificate you should of course **NOT** track it in git but transfer it to the VM before running `vagrant provision`_ | ||
|
||
Add the following to your `config.yml`: | ||
|
||
```yaml | ||
apache_vhosts_ssl: | ||
- servername: "{{ drupal_domain }}" | ||
documentroot: "{{ drupal_core_path }}" | ||
certificate_file: "/vagrant/example.crt" | ||
certificate_key_file: "/vagrant/example.key" | ||
extra_parameters: "{{ apache_vhost_php_fpm_parameters }}" | ||
``` | ||
### Using Ubuntu's snakeoil certificate | ||
If you are using Ubuntu as your base OS and you want to get started quickly with a local development environment you can use the snakeoil certificate that is already generated. | ||
```yaml | ||
apache_vhosts_ssl: | ||
- servername: "{{ drupal_domain }}" | ||
documentroot: "{{ drupal_core_path }}" | ||
certificate_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" | ||
certificate_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" | ||
extra_parameters: "{{ apache_vhost_php_fpm_parameters }}" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
To use Nginx instead of Apache, change the `drupalvm_webserver` variable inside your customized `config.yml`, from `apache` to `nginx`. | ||
|
||
Because Nginx server directives behave a little differently than Apache's VirtualHosts, Drupal VM includes a custom Drupal-optimized Nginx server block configuration, and you can control all the servers ('virtual hosts') Nginx will run using the `nginx_hosts` configuration. A few simple examples are shown in `default.config.yml`, but you have some extra flexibility if you need it. See the `nginx-vhost.conf.j2` template for more information. | ||
|
||
Also, see the examples included in the [`geerlingguy.nginx` Ansible role's README](https://github.com/geerlingguy/ansible-role-nginx#readme) for more info, as well as many other variables you can override to configure Nginx exactly how you like it. | ||
|
||
_Note: if you're using php-fpm, you may want to reflect your use of nginx by setting `php_fpm_pool_user` and `php_fpm_pool_group` in your `config.yml`._ | ||
|
||
## Enable SSL Support with Nginx | ||
|
||
To enable SSL support for you virtual hosts you first need a certificate file. See the same section under the [Apache documentation](webservers-apache.md#enable-ssl-support-with-apache) for how to generate a self-signed certficiate. | ||
|
||
Modify your nginx host configuration by adding the following `extra_parameters` to the first entry in `nginx_hosts`: | ||
|
||
```yaml | ||
- server_name: "{{ drupal_domain }} www.{{ drupal_domain }}" | ||
root: "{{ drupal_core_path }}" | ||
is_php: true | ||
extra_parameters: | | ||
listen 443 ssl; | ||
ssl_certificate /vagrant/example.crt; | ||
ssl_certificate_key /vagrant/example.key; | ||
ssl_protocols TLSv1.1 TLSv1.2; | ||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
``` | ||
### Using Ubuntu's snakeoil certificate | ||
If you are using Ubuntu as your base OS and you want to get started quickly with a local development environment you can use the snakeoil certificate that is already generated. | ||
```yaml | ||
- server_name: "{{ drupal_domain }} www.{{ drupal_domain }}" | ||
root: "{{ drupal_core_path }}" | ||
is_php: true | ||
extra_parameters: | | ||
listen 443 ssl; | ||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; | ||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; | ||
ssl_protocols TLSv1.1 TLSv1.2; | ||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Out of the box Drupal VM is configured to use `composer create-project` to build a Drupal 8 codebase. | ||
|
||
This is set up with the following variables in `config.yml`: | ||
|
||
- Composer will build the project if `build_composer_project` is `true`, and `build_makefile` and `build_composer` are both `false`. | ||
- The Composer package is defined by `drupal_composer_project_package`. | ||
- Adjust the create-project CLI options in `drupal_composer_project_options` as well as add additional dependencies in `drupal_composer_dependencies`. | ||
- Ensure that the webroot configured in the Composer package matches the one set in `drupal_core_path`. The default is set to `web/`. | ||
|
||
With [acquia/lightning-project](https://github.com/acquia/lightning-project) as an example your `config.yml` settings would be: | ||
|
||
```yaml | ||
drupal_composer_project_package: "acquia/lightning-project:^8.1.0" | ||
drupal_composer_project_options: "--prefer-dist --stability rc --no-interaction" | ||
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot" | ||
``` | ||
_Opting for composer based installs will most likely increase your VM's time to provision considerably. Find out how you can [improve composer build performance](../other/performance.md#improving-composer-build-performance)._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Passing arguments to ansible during a provision | ||
|
||
You can specify an additional argument to the `ansible-playbook` command by using the `DRUPALVM_ANSIBLE_ARGS` environment variable. This can be useful when debugging a task failure. | ||
|
||
_Currently this feature has two quirks. It's only possible to pass on a single argument. You should not quote a flag's value as you would normally do in the shell._ | ||
|
||
Display verbose ansible output: | ||
|
||
```sh | ||
DRUPALVM_ANSIBLE_ARGS='--verbose' vagrant provision | ||
``` | ||
|
||
Begin the provisioning at a particular task: | ||
|
||
```sh | ||
DRUPALVM_ANSIBLE_ARGS='--start-at-task=*post-provision shell*' vagrant provision | ||
``` | ||
|
||
Override a config variable: | ||
|
||
```sh | ||
DRUPALVM_ANSIBLE_ARGS='--extra-vars=drupalvm_database=pgsql' vagrant provision | ||
``` |
Oops, something went wrong.