# Configure Apache on TurboStack

Switching a host to Apache takes a single host-level setting.

## Where to configure it

The web server is chosen at the **host** level, in the same selector used for
Nginx:

1. Open the host.
2. Go to the **Services** tab.
3. Under **Webserver**, select **apache2**.

![The Webserver panel on a host's Services tab, with the web server dropdown open showing nginx and apache2|1000](../../assets/screenshots/platform/hosts/services_webserver-choice.png)

This applies to every application on the host. Only one web server runs per host.

## YAML configuration

### Required

| Key | Meaning |
|---|---|
| `webserver` | The host's web server. Set to `apache2` to select Apache. |

### Optional

There are no additional Apache keys required - selecting `apache2` is enough for
TurboStack to provision and manage the web server.

```yaml
# Host-level: select Apache as the web server
webserver: apache2
```

> [!WARNING]
> Apache and Nginx cannot run side by side on the same host. Changing
> `webserver` swaps the web server for every application on the host. Nginx is the
> recommended default - see [Configure Nginx](../nginx/configure.md).

## Common tasks

- [use .htaccess overrides](htaccess-overrides.md)
- [run Apache behind Nginx](apache-behind-nginx.md)
- [restrict access with basic authentication](restrict-access-basic-auth.md)

## Related

- [What is Apache?](what-is.md)
- [Host Services tab](../../platform/hosts/services.md)
- [Applications overview](../../applications/index.md)
