Skip to content

Commit

Permalink
[docs] nginx/snippet/restart cleanup for #4456 (#4470)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstein committed Dec 20, 2022
1 parent 8f4de8d commit 2d289ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/content/users/basics/commands.md
Expand Up @@ -148,6 +148,9 @@ ddev config

# Configure a Drupal 8 project with a `web` document root
ddev config --docroot=web --project-type=drupal8

# Switch the project’s default `nginx-fpm` to `apache-fpm`
ddev config --webserver-type=apache-fpm
```

Flags:
Expand Down
8 changes: 8 additions & 0 deletions docs/content/users/configuration/config.md
Expand Up @@ -558,6 +558,14 @@ Whether Xdebug should be enabled for [step debugging](../debugging-profiling/ste
| -- | -- | --
| :octicons-file-directory-16: project | `nginx-fpm` | Can be `nginx-fpm` or `apache-fpm`.

To change from the default `nginx-fpm` to `apache-fpm`, for example, you would need to edit your project’s `.ddev/config.yaml` to include the following:

```yaml
webserver_type: apache-fpm
```

Then run the [`ddev restart`](../basics/commands.md#restart) command to have the change take effect.

## `working_dir`

Working directories used by [`ddev exec`](../basics/commands.md#exec) and [`ddev ssh`](../basics/commands.md#ssh).
Expand Down
10 changes: 5 additions & 5 deletions docs/content/users/extend/customization-extendibility.md
Expand Up @@ -12,7 +12,7 @@ The project's `.ddev/config.yaml` file defines the PHP version to use. The [`php

## Changing Web Server Type

DDEV supports nginx with php-fpm by default (`nginx-fpm`), and Apache with php-fpm (`apache-fpm`). These can be changed using [`webserver_type`](../configuration/config.md#webserver_type) in `.ddev/config.yaml`, for example `webserver_type: apache-fpm`, then `ddev restart`.
DDEV supports nginx with php-fpm by default (`nginx-fpm`), and Apache with php-fpm (`apache-fpm`). You can change this with the [`webserver_type`](../configuration/config.md#webserver_type) config option, or using the [`ddev config`](../basics/commands.md#config) command with the `--webserver-type` flag.

## Adding Services to a Project

Expand Down Expand Up @@ -162,15 +162,15 @@ export PATH=$PATH:/var/www/html/somewhereelse/vendor/bin
## Custom nginx Configuration
When you [`ddev restart`](../basics/commands.md#restart) using `nginx-fpm`, DDEV creates a configuration customized to your project type in `.ddev/nginx_full/nginx-site.conf`. You can edit and override the configuration by removing the `#ddev-generated` line and doing whatever you need with it. After each change, `ddev restart`.
When you run [`ddev restart`](../basics/commands.md#restart) using `nginx-fpm`, DDEV creates a configuration customized to your project type in `.ddev/nginx_full/nginx-site.conf`. You can edit and override the configuration by removing the `#ddev-generated` line and doing whatever you need with it. After each change, run `ddev restart`.
You can also have more than one config file in the `.ddev/nginx_full` directory, they will all get loaded when DDEV starts. This can be used for [serving multiple docroots](#multiple-docroots-in-nginx-advanced) and other techniques.
You can also have more than one config file in the `.ddev/nginx_full` directory, and each will be loaded when DDEV starts. This can be used for [serving multiple docroots](#multiple-docroots-in-nginx-advanced) and other techniques.
### Troubleshooting nginx Configuration
* Any errors in your configuration may cause the `web` container to fail and try to restart. If you see that behavior, use [`ddev logs`](../basics/commands.md#logs) to diagnose.
* You can run `ddev exec nginx -t` to test whether your configuration is valid. (Or run [`ddev ssh`](../basics/commands.md#ssh) and run `nginx -t`.)
* You can reload the nginx configuration either with [`ddev restart`](../basics/commands.md#restart) or `ddev exec nginx -s reload`.
* You can reload the nginx configuration by running either [`ddev restart`](../basics/commands.md#restart) or `ddev exec nginx -s reload`.
* The alias `Alias "/phpstatus" "/var/www/phpstatus.php"` is required for the health check script to work.
!!!warning "Important!"
Expand All @@ -194,7 +194,7 @@ For example, to make all HTTP URLs redirect to their HTTPS equivalents you might
}
```
After adding a snippet, `ddev restart` to make it take effect.
After adding a snippet, run `ddev restart` to make it take effect.
## Custom Apache Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/content/users/install/docker-installation.md
Expand Up @@ -65,7 +65,7 @@ You’ll need a Docker provider on your system before you can [install DDEV](dde

Docker Desktop for Windows can be downloaded via [Chocolatey](https://chocolatey.org/install) with `choco install docker-desktop` or it can be downloaded from [docker.com](https://www.docker.com/products/docker-desktop). It has extensive automated testing with DDEV, and works with DDEV both on traditional Windows and in WSL2.

Full instructions for installing DDEV with Docker Desktop on WSL2 are provided in the [WSL2 DDEV Installation](ddev-installation.md#windows-wsl2) section.
See [WSL2 DDEV Installation](ddev-installation.md#windows-wsl2) for help installing DDEV with Docker Desktop on WSL2.

=== "Linux"

Expand Down

0 comments on commit 2d289ca

Please sign in to comment.